Fix flag to disable leader-rotation (#3243)
This commit is contained in:
@ -10,6 +10,46 @@ source "$here"/common.sh
|
||||
# shellcheck source=scripts/oom-score-adj.sh
|
||||
source "$here"/../scripts/oom-score-adj.sh
|
||||
|
||||
if [[ $1 = -h ]]; then
|
||||
fullnode_usage "$@"
|
||||
fi
|
||||
|
||||
extra_fullnode_args=()
|
||||
setup_stakes=true
|
||||
|
||||
while [[ ${1:0:1} = - ]]; do
|
||||
if [[ $1 = --blockstream ]]; then
|
||||
extra_fullnode_args+=("$1" "$2")
|
||||
shift 2
|
||||
elif [[ $1 = --enable-rpc-exit ]]; then
|
||||
extra_fullnode_args+=("$1")
|
||||
shift
|
||||
elif [[ $1 = --init-complete-file ]]; then
|
||||
extra_fullnode_args+=("$1" "$2")
|
||||
shift 2
|
||||
elif [[ $1 = --only-bootstrap-stake ]]; then
|
||||
setup_stakes=false
|
||||
shift
|
||||
elif [[ $1 = --public-address ]]; then
|
||||
extra_fullnode_args+=("$1")
|
||||
shift
|
||||
elif [[ $1 = --no-signer ]]; then
|
||||
extra_fullnode_args+=("$1")
|
||||
shift
|
||||
elif [[ $1 = --rpc-port ]]; then
|
||||
extra_fullnode_args+=("$1" "$2")
|
||||
shift 2
|
||||
else
|
||||
echo "Unknown argument: $1"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n $3 ]]; then
|
||||
fullnode_usage "$@"
|
||||
fi
|
||||
|
||||
|
||||
[[ -f "$SOLANA_CONFIG_DIR"/bootstrap-leader-id.json ]] || {
|
||||
echo "$SOLANA_CONFIG_DIR/bootstrap-leader-id.json not found, create it by running:"
|
||||
echo
|
||||
@ -27,12 +67,10 @@ tune_system
|
||||
|
||||
$solana_ledger_tool --ledger "$SOLANA_CONFIG_DIR"/bootstrap-leader-ledger verify
|
||||
|
||||
|
||||
bootstrap_leader_id_path="$SOLANA_CONFIG_DIR"/bootstrap-leader-id.json
|
||||
bootstrap_leader_staker_id_path="$SOLANA_CONFIG_DIR"/bootstrap-leader-staker-id.json
|
||||
bootstrap_leader_staker_id=$($solana_wallet --keypair "$bootstrap_leader_staker_id_path" address)
|
||||
|
||||
set -x
|
||||
trap 'kill "$pid" && wait "$pid"' INT TERM ERR
|
||||
$program \
|
||||
--identity "$bootstrap_leader_id_path" \
|
||||
@ -42,11 +80,13 @@ $program \
|
||||
--accounts "$SOLANA_CONFIG_DIR"/bootstrap-leader-accounts \
|
||||
--rpc-port 8899 \
|
||||
--rpc-drone-address 127.0.0.1:9900 \
|
||||
"$@" \
|
||||
"${extra_fullnode_args[@]}" \
|
||||
> >($bootstrap_leader_logger) 2>&1 &
|
||||
pid=$!
|
||||
oom_score_adj "$pid" 1000
|
||||
|
||||
setup_fullnode_staking 127.0.0.1 "$bootstrap_leader_id_path" "$bootstrap_leader_staker_id_path"
|
||||
if [[ $setup_stakes = true ]] ; then
|
||||
setup_fullnode_staking 127.0.0.1 "$bootstrap_leader_id_path" "$bootstrap_leader_staker_id_path"
|
||||
fi
|
||||
|
||||
wait "$pid"
|
||||
|
Reference in New Issue
Block a user