mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-15 00:13:46 +00:00
fix logic
This commit is contained in:
parent
5f0fc27fea
commit
6c77efc955
1 changed files with 6 additions and 4 deletions
|
|
@ -6,7 +6,9 @@ balanceInit=$(docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec
|
||||||
#delay=600
|
#delay=600
|
||||||
#echo "Wait ${delay} seconds for state-sync..."
|
#echo "Wait ${delay} seconds for state-sync..."
|
||||||
#sleep $delay
|
#sleep $delay
|
||||||
count=0
|
stateSyncFound=false
|
||||||
|
checkpointFound=false
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
|
||||||
|
|
@ -24,7 +26,7 @@ do
|
||||||
#exit 1
|
#exit 1
|
||||||
else
|
else
|
||||||
echo "State Sync occured!"
|
echo "State Sync occured!"
|
||||||
count=$((count+1))
|
stateSyncFound=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
checkpointID=$(curl -sL http://localhost:1317/checkpoints/latest | jq .result.id)
|
checkpointID=$(curl -sL http://localhost:1317/checkpoints/latest | jq .result.id)
|
||||||
|
|
@ -34,10 +36,10 @@ do
|
||||||
#exit 1
|
#exit 1
|
||||||
else
|
else
|
||||||
echo "Found checkpoint ID:" $checkpointID
|
echo "Found checkpoint ID:" $checkpointID
|
||||||
count=$((count+1))
|
checkpointFound=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $count -eq 2 ]; then
|
if [ $stateSyncFound && $checkpointFound ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue