net.sh: Skip validator accounts creation if primordial
This commit is contained in:
committed by
Trent Nelson
parent
33abd11a47
commit
ff88c96549
@ -268,6 +268,10 @@ wallet() {
|
|||||||
setup_validator_accounts() {
|
setup_validator_accounts() {
|
||||||
declare node_sol=$1
|
declare node_sol=$1
|
||||||
|
|
||||||
|
if [[ -n "$SKIP_ACCOUNTS_CREATION" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
if ! wallet vote-account "$vote_account"; then
|
if ! wallet vote-account "$vote_account"; then
|
||||||
if ((airdrops_enabled)); then
|
if ((airdrops_enabled)); then
|
||||||
echo "Adding $node_sol to validator identity account:"
|
echo "Adding $node_sol to validator identity account:"
|
||||||
|
@ -385,7 +385,14 @@ EOF
|
|||||||
args+=(--init-complete-file "$initCompleteFile")
|
args+=(--init-complete-file "$initCompleteFile")
|
||||||
# shellcheck disable=SC2206 # Don't want to double quote $extraNodeArgs
|
# shellcheck disable=SC2206 # Don't want to double quote $extraNodeArgs
|
||||||
args+=($extraNodeArgs)
|
args+=($extraNodeArgs)
|
||||||
|
|
||||||
|
maybeSkipAccountsCreation=
|
||||||
|
if [[ $nodeIndex -le $extraPrimordialStakes ]]; then
|
||||||
|
maybeSkipAccountsCreation="export SKIP_ACCOUNTS_CREATION=1"
|
||||||
|
fi
|
||||||
|
|
||||||
cat >> ~/solana/on-reboot <<EOF
|
cat >> ~/solana/on-reboot <<EOF
|
||||||
|
$maybeSkipAccountsCreation
|
||||||
nohup multinode-demo/validator.sh ${args[@]} > validator.log.\$now 2>&1 &
|
nohup multinode-demo/validator.sh ${args[@]} > validator.log.\$now 2>&1 &
|
||||||
pid=\$!
|
pid=\$!
|
||||||
oom_score_adj "\$pid" 1000
|
oom_score_adj "\$pid" 1000
|
||||||
@ -397,7 +404,7 @@ EOF
|
|||||||
net/remote/remote-node-wait-init.sh 600
|
net/remote/remote-node-wait-init.sh 600
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $skipSetup != true && $nodeType != blockstreamer ]]; then
|
if [[ $skipSetup != true && $nodeType != blockstreamer && -z $maybeSkipAccountsCreation ]]; then
|
||||||
# Wait for the validator to catch up to the bootstrap validator before
|
# Wait for the validator to catch up to the bootstrap validator before
|
||||||
# delegating stake to it
|
# delegating stake to it
|
||||||
solana --url http://"$entrypointIp":8899 catchup config/validator-identity.json
|
solana --url http://"$entrypointIp":8899 catchup config/validator-identity.json
|
||||||
|
Reference in New Issue
Block a user