Skip to content

Commit 185d8c5

Browse files
committed
refactor: cleaner warnings for failed heart beat blocks
1 parent 1216091 commit 185d8c5

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

rofl_oracle/header_oracle.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,11 +564,21 @@ async def watch_addresses_for_interactions(self) -> None:
564564
logger.info(
565565
f"Heartbeat: stored block {heartbeat_block} as checkpoint"
566566
)
567-
self.last_heartbeat_time = time.time()
568567
else:
569-
logger.error(
570-
f"Failed to submit heartbeat block {heartbeat_block}"
568+
logger.warning(
569+
f"Heartbeat submission failed for block {heartbeat_block}"
571570
)
571+
else:
572+
logger.warning(
573+
f"Heartbeat block {heartbeat_block} has no hash"
574+
)
575+
else:
576+
logger.warning(
577+
f"Could not fetch heartbeat block {heartbeat_block}"
578+
)
579+
580+
# Always update timer, avoid retry storm for non-critical block
581+
self.last_heartbeat_time = time.time()
572582

573583
# Update scan position to last successfully processed block
574584
if last_successful_block >= start_block:

0 commit comments

Comments
 (0)