v1.0: Test ledger-tool commands in run-sanity.sh (bp #10211) (#10213)

automerge
This commit is contained in:
mergify[bot]
2020-05-24 09:00:21 -07:00
committed by GitHub
parent 88199e77ab
commit 65b5bddf4e

View File

@ -2,8 +2,10 @@
set -e
cd "$(dirname "$0")/.."
# shellcheck source=multinode-demo/common.sh
source multinode-demo/common.sh
rm -f config/run/init-completed
rm -rf config/run/init-completed config/ledger config/snapshot-ledger
timeout 15 ./run.sh &
pid=$!
@ -20,3 +22,8 @@ done
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"validatorExit"}' http://localhost:8899
wait $pid
$solana_ledger_tool create-snapshot --ledger config/ledger 1 config/snapshot-ledger
cp config/ledger/genesis.tar.bz2 config/snapshot-ledger
tar -C config/snapshot-ledger -xvf config/snapshot-ledger/genesis.tar.bz2
$solana_ledger_tool verify --ledger config/snapshot-ledger