-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Updates to dynamic-network-test to start validators in parallel #722
Conversation
Some(leader_data.contact_info.ncp), | ||
); | ||
info!("started[{}/{}] {:x}", n, N, rd.debug_id()); | ||
(rd, val) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checkout into_par_iter
https://github.com/solana-labs/solana/blob/master/src/bin/client-demo.rs#L131
It’s part rayon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aeyakovenko , that made it really simple.
let validator = TestNode::new_localhost_with_pubkey(keypair.pubkey()); | ||
let rd = validator.data.clone(); | ||
//send some tokens to the new validator | ||
let bal = send_tx_and_retry_get_balance( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do this part first, before starting any validators, make sure their keys are valid and have a balance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean, transfer balance to all validators, before any of them is started?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, basically do all the prep work before any of them are started so start should be fast
No description provided.