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
fi
if (( $balance > $balanceInit )); then
if (( $balance > $balanceInit )) && [ $stateSyncFound != "true" ]; then
stateSyncTime=$(( SECONDS - start_time ))
stateSyncFound="true"
fi
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 ))
checkpointFound="true"
fi