Merge pull request #527 from maticnetwork/shivam/pos-826

chg : generalised state-sync integration test
This commit is contained in:
SHIVAM SHARMA 2022-09-24 00:57:24 +05:30 committed by GitHub
commit e4f0141f68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -e
balanceInit=$(docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'Math.round(web3.fromWei(eth.getBalance(eth.accounts[0])))'")
delay=600 delay=600
echo "Wait ${delay} seconds for state-sync..." echo "Wait ${delay} seconds for state-sync..."
@ -16,7 +18,7 @@ fi
echo "Found matic balance on account[0]: " $balance echo "Found matic balance on account[0]: " $balance
if (( $balance <= 1001 )); then if (( $balance <= $balanceInit )); then
echo "Balance in bor network has not increased. This indicates that something is wrong with state sync." echo "Balance in bor network has not increased. This indicates that something is wrong with state sync."
exit 1 exit 1
fi fi
@ -30,4 +32,4 @@ else
echo "Found checkpoint ID:" $checkpointID echo "Found checkpoint ID:" $checkpointID
fi fi
echo "All tests have passed!" echo "All tests have passed!"