Skip to content

Commit

Permalink
Merge pull request ethereum#527 from maticnetwork/shivam/pos-826
Browse files Browse the repository at this point in the history
chg : generalised state-sync integration test
  • Loading branch information
0xsharma authored Sep 23, 2022
2 parents 77db80c + 2e7e99f commit e4f0141
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions integration-tests/smoke_test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
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

echo "Wait ${delay} seconds for state-sync..."
Expand All @@ -16,7 +18,7 @@ fi

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."
exit 1
fi
Expand All @@ -30,4 +32,4 @@ else
echo "Found checkpoint ID:" $checkpointID
fi

echo "All tests have passed!"
echo "All tests have passed!"

0 comments on commit e4f0141

Please sign in to comment.