Skip to content

Commit

Permalink
Update polkadot/node/network/statement-distribution/src/v2/mod.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>
  • Loading branch information
ordian and tdimitrov authored Nov 8, 2023
1 parent d1b2a20 commit fadc859
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions polkadot/node/network/statement-distribution/src/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,7 @@ impl PerSessionState {
/// Returns `None` if the group index is out of bounds.
pub fn disabled_bitmask(&self, group: GroupIndex) -> Option<BitVec<u8, Lsb0>> {
let group = self.groups.get(group)?;
let group_size = group.len();
let mut mask = BitVec::repeat(false, group_size);
for (i, v) in group.iter().enumerate() {
if self.is_disabled(v) {
mask.set(i, true);
}
}
let mask = BitVec::from_iter(group.iter().map(|v| self.is_disabled(v)));
Some(mask)
}

Expand Down

0 comments on commit fadc859

Please sign in to comment.