Add --wait-for-super-majority to facilitate asynchronous cluster restarts

This commit is contained in:
Michael Vines
2020-01-07 14:18:34 -07:00
parent d9cf9709d2
commit 48ab88a2af
2 changed files with 63 additions and 8 deletions

View File

@ -537,6 +537,12 @@ pub fn main() {
.takes_value(true)
.help("Redirect logging to the specified file, '-' for standard error"),
)
.arg(
Arg::with_name("wait_for_super_majority")
.long("wait-for-super-majority")
.takes_value(false)
.help("After processing the ledger, wait until a super majority of stake is visible on gossip before starting PoH"),
)
.get_matches();
let identity_keypair = Arc::new(
@ -582,6 +588,7 @@ pub fn main() {
validator_config.dev_halt_at_slot = value_t!(matches, "dev_halt_at_slot", Slot).ok();
validator_config.rpc_config.enable_validator_exit = matches.is_present("enable_rpc_exit");
validator_config.wait_for_super_majority = matches.is_present("wait_for_super_majority");
validator_config.rpc_config.faucet_addr = matches.value_of("rpc_faucet_addr").map(|address| {
solana_net_utils::parse_host_port(address).expect("failed to parse faucet address")