Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoffranca committed Apr 4, 2024
1 parent cae038e commit d5c0082
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions node/tools/src/bin/localnet_config.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//! This tool constructs collection of node configs for running tests.
use anyhow::Context as _;
use clap::Parser;
use rand::seq::SliceRandom as _;
use rand::Rng;
use rand::{seq::SliceRandom as _, Rng};
use std::{
collections::{HashMap, HashSet},
fs,
Expand Down Expand Up @@ -89,10 +88,12 @@ fn main() -> anyhow::Result<()> {
cfgs.shuffle(rng);
let mut next = 0;
for i in 0..cfgs.len() {
cfgs[i].gossip_static_outbound = (0..peers).map(|_| {
next = (next+1) % nodes;
(cfgs[next].node_key.public(), cfgs[next].public_addr.clone())
}).collect();
cfgs[i].gossip_static_outbound = (0..peers)
.map(|_| {
next = (next + 1) % nodes;
(cfgs[next].node_key.public(), cfgs[next].public_addr.clone())
})
.collect();
}
}

Expand Down

0 comments on commit d5c0082

Please sign in to comment.