Add fullnode --no-leader-rotation flag

This commit is contained in:
Michael Vines 2018-12-06 09:08:30 -08:00
parent b45d07c8cb
commit cc2f448d92
3 changed files with 8 additions and 1 deletions

View File

@ -33,6 +33,7 @@ tune_networking
trap 'kill "$pid" && wait "$pid"' INT TERM
$program \
--no-leader-rotation \
--identity "$SOLANA_CONFIG_DIR"/leader.json \
--ledger "$SOLANA_CONFIG_DIR"/ledger \
--rpc 8899 \

View File

@ -173,6 +173,7 @@ $rsync -vPr "$rsync_leader_url"/config/ "$SOLANA_LEADER_CONFIG_DIR"
trap 'kill "$pid" && wait "$pid"' INT TERM
$program \
--no-leader-rotation \
--identity "$validator_json_path" \
--network "$leader_address" \
--ledger "$SOLANA_LEADER_CONFIG_DIR"/ledger \

View File

@ -37,6 +37,10 @@ fn main() {
.short("v")
.long("nosigverify")
.help("Run without signature verification"),
).arg(
Arg::with_name("no-leader-rotation")
.long("no-leader-rotation")
.help("Disable leader rotation"),
).arg(
Arg::with_name("identity")
.short("i")
@ -68,6 +72,7 @@ fn main() {
).get_matches();
let nosigverify = matches.is_present("nosigverify");
let use_only_bootstrap_leader = matches.is_present("no-leader-rotation");
let (keypair, vote_account_keypair, ncp) = if let Some(i) = matches.value_of("identity") {
let path = i.to_string();
@ -111,7 +116,7 @@ fn main() {
let mut leader_scheduler = LeaderScheduler::default();
// Remove this line to enable leader rotation
leader_scheduler.use_only_bootstrap_leader = true;
leader_scheduler.use_only_bootstrap_leader = use_only_bootstrap_leader;
let rpc_port = if let Some(port) = matches.value_of("rpc") {
let port_number = port.to_string().parse().expect("integer");