File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
crates/starfish/core/src/network Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -272,8 +272,8 @@ fn authority_set_to_bitmask(authorities: &BTreeSet<AuthorityIndex>) -> [u64; 4]
272
272
273
273
fn bitmask_to_authority_set ( bitmask : [ u64 ; 4 ] ) -> BTreeSet < AuthorityIndex > {
274
274
let mut set = BTreeSet :: new ( ) ;
275
- for array_index in 0 .. 4 {
276
- let mut bits = bitmask [ array_index ] ;
275
+ for ( array_index, & bits ) in bitmask . iter ( ) . enumerate ( ) {
276
+ let mut bits = bits ;
277
277
let base = array_index * 64 ;
278
278
while bits != 0 {
279
279
let bit = bits. trailing_zeros ( ) as usize ;
@@ -283,6 +283,7 @@ fn bitmask_to_authority_set(bitmask: [u64; 4]) -> BTreeSet<AuthorityIndex> {
283
283
}
284
284
set
285
285
}
286
+
286
287
impl SerializedBlockBundleParts {
287
288
pub ( crate ) fn useful_authorities ( & self ) -> BTreeSet < AuthorityIndex > {
288
289
bitmask_to_authority_set ( self . useful_authorities_bitmask )
You can’t perform that action at this time.
0 commit comments