fix: timer condition

This commit is contained in:
Raneet Debnath 2022-11-18 18:38:03 +05:30
parent 1da5b36da9
commit f3573f086d

View file

@ -18,14 +18,14 @@ do
exit 1 exit 1
fi fi
if (( $balance > $balanceInit )); then if (( $balance > $balanceInit )) && [ $stateSyncFound != "true" ]; then
stateSyncTime=$(( SECONDS - start_time )) stateSyncTime=$(( SECONDS - start_time ))
stateSyncFound="true" 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)
if [ $checkpointID != "null" ]; then if [ $checkpointID != "null" ] && [ $checkpointFound != "true"]; then
checkpointTime=$(( SECONDS - start_time )) checkpointTime=$(( SECONDS - start_time ))
checkpointFound="true" checkpointFound="true"
fi fi