Skip to content

feat: exit on loop#101

Merged
rllola merged 2 commits intomainfrom
feat/exit-on-loop
Dec 9, 2025
Merged

feat: exit on loop#101
rllola merged 2 commits intomainfrom
feat/exit-on-loop

Conversation

@rllola
Copy link
Contributor

@rllola rllola commented Dec 9, 2025

Summary

This PR add a way to detect if we are stuck in a loop. Sometimes node don't have the rest of the chain so we need to connect to another node. We added a check to verify if the blocks headers return is either empty or the same as our current one.

In addition there is a check that compare the current time with the block to timestamp to determine if the block has been recently created. In the case the block has been created during the last 15 seconds. We wait 15 seconds so the next block can be created.

What changed

  • A check to verify we are not stuck in a loop
  • Determine if the block has been created in the last 15 seconds, meaning we have the lastest block and we can wait 15 seconds that's the next one is created

@rllola rllola merged commit e816062 into main Dec 9, 2025
2 checks passed
@rllola rllola deleted the feat/exit-on-loop branch December 9, 2025 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant