From 3b7fd1a3bb1de0a42caebef777cb01940b79229b Mon Sep 17 00:00:00 2001 From: ordian Date: Tue, 10 Oct 2023 18:35:42 +0200 Subject: [PATCH] fix disabled_mask --- .../statement-distribution/src/v2/statement_store.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polkadot/node/network/statement-distribution/src/v2/statement_store.rs b/polkadot/node/network/statement-distribution/src/v2/statement_store.rs index 0da7308ae5bd..84156b3f3a6e 100644 --- a/polkadot/node/network/statement-distribution/src/v2/statement_store.rs +++ b/polkadot/node/network/statement-distribution/src/v2/statement_store.rs @@ -172,9 +172,9 @@ impl StatementStore { pub fn disabled_bitmask(&self, group: &[ValidatorIndex]) -> BitVec { let group_size = group.len(); let mut mask = BitVec::repeat(false, group_size); - for i in group { - if self.is_disabled(i) { - mask.set(i.0 as usize, true); + for (i, v) in group.iter().enumerate() { + if self.is_disabled(v) { + mask.set(i, true); } } mask