Enable booting testnet validators without tower required (backport #19298) (#19306)

* Enable booting testnet validators without tower required (#19298)

(cherry picked from commit 7d135f185c)

# Conflicts:
#	net/net.sh

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
mergify[bot]
2021-08-19 06:37:17 +00:00
committed by GitHub
parent a492de1bea
commit 80a6479c47
3 changed files with 23 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ else
fi
no_restart=0
maybeRequireTower=true
args=()
while [[ -n $1 ]]; do
@@ -78,6 +79,9 @@ while [[ -n $1 ]]; do
elif [[ $1 == --accounts-db-skip-shrink ]]; then
args+=("$1")
shift
elif [[ $1 == --skip-require-tower ]]; then
maybeRequireTower=false
shift
else
echo "Unknown argument: $1"
$program --help
@@ -102,8 +106,11 @@ ledger_dir="$SOLANA_CONFIG_DIR"/bootstrap-validator
exit 1
}
if [[ $maybeRequireTower = true ]]; then
args+=(--require-tower)
fi
args+=(
--require-tower
--ledger "$ledger_dir"
--rpc-port 8899
--snapshot-interval-slots 200

View File

@@ -45,6 +45,8 @@ EOF
exit 1
}
maybeRequireTower=true
positional_args=()
while [[ -n $1 ]]; do
if [[ ${1:0:1} = - ]]; then
@@ -158,6 +160,9 @@ while [[ -n $1 ]]; do
elif [[ $1 == --accounts-db-skip-shrink ]]; then
args+=("$1")
shift
elif [[ $1 == --skip-require-tower ]]; then
maybeRequireTower=false
shift
elif [[ $1 = -h ]]; then
usage "$@"
else
@@ -230,7 +235,10 @@ default_arg --identity "$identity"
default_arg --vote-account "$vote_account"
default_arg --ledger "$ledger_dir"
default_arg --log -
default_arg --require-tower
if [[ $maybeRequireTower = true ]]; then
default_arg --require-tower
fi
if [[ -n $SOLANA_CUDA ]]; then
program=$solana_validator_cuda