Attribute invalid column proof error to correct peer (#6377)

* Attribute invalid column proof error to correct peer

* Update beacon_node/beacon_chain/src/data_availability_checker.rs

Co-authored-by: Pawan Dhananjay <pawandhananjay@gmail.com>

* fix conflicts
This commit is contained in:
Lion - dapplion
2024-09-23 14:49:26 -04:00
committed by GitHub
parent 012e7e7bfa
commit d84df5799c
6 changed files with 76 additions and 28 deletions

View File

@@ -139,6 +139,15 @@ impl PeerGroup {
pub fn all(&self) -> impl Iterator<Item = &PeerId> + '_ {
self.peers.keys()
}
pub fn of_index(&self, index: usize) -> impl Iterator<Item = &PeerId> + '_ {
self.peers.iter().filter_map(move |(peer, indices)| {
if indices.contains(&index) {
Some(peer)
} else {
None
}
})
}
}
/// Sequential ID that uniquely identifies ReqResp outgoing requests