Validators now request an airdrop of 1 token before starting up

This commit is contained in:
Michael Vines
2018-07-13 09:34:42 -07:00
parent 18e6ff4167
commit 8e7a2a9587
2 changed files with 12 additions and 4 deletions

View File

@ -81,6 +81,14 @@ if [[ ! -f "$SOLANA_LEADER_CONFIG_DIR"/ledger.log &&
"$SOLANA_LEADER_CONFIG_DIR"/tx-*.log) > "$SOLANA_LEADER_CONFIG_DIR"/ledger.log
fi
# Ensure the validator has at least 1 token before connecting to the network
# TODO: Remove this workaround
while ! $solana_wallet \
-l "$SOLANA_CONFIG_CLIENT_DIR"/leader.json \
-k "$SOLANA_CONFIG_PRIVATE_DIR"/id.json airdrop --tokens 1; do
sleep 1
done
# shellcheck disable=SC2086 # $program should not be quoted
exec $program \
--identity "$SOLANA_CONFIG_DIR"/validator.json \