Skip to content

Commit

Permalink
avoid reusing node_index
Browse files Browse the repository at this point in the history
  • Loading branch information
rjwalters committed Jun 18, 2020
1 parent f591d45 commit 98baf20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions consensus/scp/tests/mock_network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ impl SimulatedNetwork {
let validators = options_for_this_node
.validators
.iter()
.map(|node_index| test_utils::test_node_id(*node_index as u32))
.map(|id| test_utils::test_node_id(*id as u32))
.collect::<Vec<NodeID>>();

let qs = QuorumSet::new_with_node_ids(options_for_this_node.k, validators);

let peers = options_for_this_node
.peers
.iter()
.map(|node_index| test_utils::test_node_id(*node_index as u32))
.map(|id| test_utils::test_node_id(*id as u32))
.collect::<HashSet<NodeID>>();

let node_id = test_utils::test_node_id(node_index as u32);
Expand Down

0 comments on commit 98baf20

Please sign in to comment.