Skip to content

Commit

Permalink
Pass health checks if any block is produced (#1631)
Browse files Browse the repository at this point in the history
Previously, the check only passed if the latest returned block was greater than the previous one. Occasionally, we reset the devnet to an earlier block. This causes all the health checks to fail. So instead we just assert that the 'latest' block has changed within the last 60 seconds, even if the block number has decreased.
  • Loading branch information
JamesHinshelwood authored Oct 14, 2024
1 parent 4791fce commit dcc7e25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion z2/resources/node_provision.tera.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def health():
current_time = int(time())
print (f"block {block_number} latest {latest_block_number}")
if block_number > latest_block_number:
if block_number != latest_block_number:
latest_block_number = block_number
latest_block_number_obtained_at = current_time
Expand Down

0 comments on commit dcc7e25

Please sign in to comment.