debug run-sanity.sh (#16163)

This commit is contained in:
sakridge 2021-03-30 15:51:14 -07:00 committed by GitHub
parent 7db3af647b
commit c70674a616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -7,7 +7,7 @@ source multinode-demo/common.sh
rm -rf config/run/init-completed config/ledger config/snapshot-ledger rm -rf config/run/init-completed config/ledger config/snapshot-ledger
timeout 120 ./run.sh & SOLANA_RUN_SH_VALIDATOR_ARGS="--snapshot-interval-slots 200" timeout 120 ./run.sh &
pid=$! pid=$!
attempts=20 attempts=20
@ -16,6 +16,8 @@ while [[ ! -f config/run/init-completed ]]; do
if ((--attempts == 0)); then if ((--attempts == 0)); then
echo "Error: validator failed to boot" echo "Error: validator failed to boot"
exit 1 exit 1
else
echo "Checking init"
fi fi
done done
@ -24,6 +26,7 @@ snapshot_slot=1
# wait a bit longer than snapshot_slot # wait a bit longer than snapshot_slot
while [[ $($solana_cli --url http://localhost:8899 slot --commitment recent) -le $((snapshot_slot + 1)) ]]; do while [[ $($solana_cli --url http://localhost:8899 slot --commitment recent) -le $((snapshot_slot + 1)) ]]; do
sleep 1 sleep 1
echo "Checking slot"
done done
$solana_validator --ledger config/ledger exit --force || true $solana_validator --ledger config/ledger exit --force || true