Fix race in ci/run-sanity.sh (#10796)
This commit is contained in:
parent
7ade330b23
commit
4dc9f378b8
|
@ -19,13 +19,16 @@ while [[ ! -f config/run/init-completed ]]; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
while [[ $($solana_cli --url http://localhost:8899 slot --commitment recent) -eq 0 ]]; do
|
snapshot_slot=1
|
||||||
|
|
||||||
|
# wait a bit longer than snapshot_slot
|
||||||
|
while [[ $($solana_cli --url http://localhost:8899 slot --commitment recent) -le $((snapshot_slot + 1)) ]]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"validatorExit"}' http://localhost:8899
|
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"validatorExit"}' http://localhost:8899
|
||||||
|
|
||||||
wait $pid
|
wait $pid
|
||||||
|
|
||||||
$solana_ledger_tool create-snapshot --ledger config/ledger 1 config/snapshot-ledger
|
$solana_ledger_tool create-snapshot --ledger config/ledger "$snapshot_slot" config/snapshot-ledger
|
||||||
cp config/ledger/genesis.tar.bz2 config/snapshot-ledger
|
cp config/ledger/genesis.tar.bz2 config/snapshot-ledger
|
||||||
$solana_ledger_tool verify --ledger config/snapshot-ledger
|
$solana_ledger_tool verify --ledger config/snapshot-ledger
|
||||||
|
|
Loading…
Reference in New Issue