update
This commit is contained in:
@@ -32,11 +32,11 @@ for path in $pathlist; do
|
|||||||
current_timestamp=$(date +%s)
|
current_timestamp=$(date +%s)
|
||||||
age=$((current_timestamp - ("16#${latest_block_timestamp#0x}")))
|
age=$((current_timestamp - ("16#${latest_block_timestamp#0x}")))
|
||||||
|
|
||||||
|
echo "$age"
|
||||||
|
|
||||||
if (( age < ${2:-3600} )); then
|
if (( age < ${2:-3600} )); then
|
||||||
echo "Block is less than ${2:-3600} seconds old. Age: $age seconds"
|
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Block is older than ${2:-3600} seconds. Age: $age seconds"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user