Add -c option to easily interrogate the number of nodes
This commit is contained in:
parent
fece91c4d1
commit
a67f58e9a5
|
@ -16,6 +16,7 @@ if [[ -z $leader ]]; then
|
|||
fi
|
||||
fi
|
||||
count=${2:-1}
|
||||
shift 2
|
||||
|
||||
rsync_leader_url=$(rsync_url "$leader")
|
||||
|
||||
|
@ -30,4 +31,4 @@ $solana_client_demo \
|
|||
-n "$count" \
|
||||
-l "$SOLANA_CONFIG_CLIENT_DIR"/leader.json \
|
||||
-k "$SOLANA_CONFIG_CLIENT_DIR"/client.json \
|
||||
|
||||
"$@"
|
||||
|
|
|
@ -195,6 +195,11 @@ fn main() {
|
|||
.takes_value(true)
|
||||
.help("send transactions for this many seconds"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("converge_only")
|
||||
.short("c")
|
||||
.help("exit immediately after converging"),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
let leader: NodeInfo;
|
||||
|
@ -225,9 +230,13 @@ fn main() {
|
|||
let signal = Arc::new(AtomicBool::new(false));
|
||||
let mut c_threads = vec![];
|
||||
let validators = converge(&leader, &signal, num_nodes, &mut c_threads);
|
||||
println!("Network has {} node(s)", validators.len());
|
||||
println!("Nodes: {}", validators.len());
|
||||
assert!(validators.len() >= num_nodes);
|
||||
|
||||
if matches.is_present("converge_only") {
|
||||
return;
|
||||
}
|
||||
|
||||
let mut client = mk_client(&leader);
|
||||
|
||||
let starting_balance = client.poll_get_balance(&id.pubkey()).unwrap();
|
||||
|
|
Loading…
Reference in New Issue