Leader rotation flag plumbing

This commit is contained in:
Michael Vines
2018-12-05 17:33:32 -08:00
parent 3d996bf080
commit 094f0a8be3
8 changed files with 76 additions and 11 deletions

View File

@ -29,11 +29,28 @@ else
program="$solana_fullnode"
fi
maybe_no_leader_rotation=
if [[ $1 = --no-leader-rotation ]]; then
maybe_no_leader_rotation="--no-leader-rotation"
shift
fi
if [[ -n $1 ]]; then
echo "Unknown argument: $1"
exit 1
fi
if [[ -d $SNAP ]]; then
if [[ $(snapctl get leader-rotation) = false ]]; then
maybe_no_leader_rotation="--no-leader-rotation"
fi
fi
tune_networking
trap 'kill "$pid" && wait "$pid"' INT TERM
$program \
--no-leader-rotation \
$maybe_no_leader_rotation \
--identity "$SOLANA_CONFIG_DIR"/bootstrap-leader.json \
--ledger "$SOLANA_CONFIG_DIR"/bootstrap-leader-ledger \
--rpc 8899 \