Preserve pre-existing vote/stake keypairs for bootstrap validator (#19405)
This commit is contained in:
parent
46890ac197
commit
d559426373
|
@ -21,9 +21,16 @@ if [[ -f $BOOTSTRAP_VALIDATOR_IDENTITY_KEYPAIR ]]; then
|
||||||
else
|
else
|
||||||
$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/identity.json
|
$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/identity.json
|
||||||
fi
|
fi
|
||||||
|
if [[ -f $BOOTSTRAP_VALIDATOR_STAKE_KEYPAIR ]]; then
|
||||||
$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/vote-account.json
|
cp -f "$BOOTSTRAP_VALIDATOR_STAKE_KEYPAIR" "$SOLANA_CONFIG_DIR"/bootstrap-validator/stake-account.json
|
||||||
$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/stake-account.json
|
else
|
||||||
|
$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/stake-account.json
|
||||||
|
fi
|
||||||
|
if [[ -f $BOOTSTRAP_VALIDATOR_VOTE_KEYPAIR ]]; then
|
||||||
|
cp -f "$BOOTSTRAP_VALIDATOR_VOTE_KEYPAIR" "$SOLANA_CONFIG_DIR"/bootstrap-validator/vote-account.json
|
||||||
|
else
|
||||||
|
$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/vote-account.json
|
||||||
|
fi
|
||||||
|
|
||||||
args=(
|
args=(
|
||||||
"$@"
|
"$@"
|
||||||
|
|
|
@ -217,6 +217,12 @@ EOF
|
||||||
if [[ -f net/keypairs/bootstrap-validator-identity.json ]]; then
|
if [[ -f net/keypairs/bootstrap-validator-identity.json ]]; then
|
||||||
export BOOTSTRAP_VALIDATOR_IDENTITY_KEYPAIR=net/keypairs/bootstrap-validator-identity.json
|
export BOOTSTRAP_VALIDATOR_IDENTITY_KEYPAIR=net/keypairs/bootstrap-validator-identity.json
|
||||||
fi
|
fi
|
||||||
|
if [[ -f net/keypairs/bootstrap-validator-stake.json ]]; then
|
||||||
|
export BOOTSTRAP_VALIDATOR_STAKE_KEYPAIR=net/keypairs/bootstrap-validator-stake.json
|
||||||
|
fi
|
||||||
|
if [[ -f net/keypairs/bootstrap-validator-vote.json ]]; then
|
||||||
|
export BOOTSTRAP_VALIDATOR_VOTE_KEYPAIR=net/keypairs/bootstrap-validator-vote.json
|
||||||
|
fi
|
||||||
echo "remote-node.sh: Primordial stakes: $extraPrimordialStakes"
|
echo "remote-node.sh: Primordial stakes: $extraPrimordialStakes"
|
||||||
if [[ "$extraPrimordialStakes" -gt 0 ]]; then
|
if [[ "$extraPrimordialStakes" -gt 0 ]]; then
|
||||||
if [[ "$extraPrimordialStakes" -gt "$numNodes" ]]; then
|
if [[ "$extraPrimordialStakes" -gt "$numNodes" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue