Skip to content

Conversation

nlipartiia-hacken
Copy link
Collaborator

@nlipartiia-hacken nlipartiia-hacken commented Dec 2, 2022

Close #14

I couldn't catch this error, so I changed timeout for checkForLatestBlock:

 setInterval(() => {
    checkForLatestBlock()
  }, TIMEOUT * 7)

This way indexer misses blocks more often and in less than 10 minutes I received this error. I think this change doesn't impact the issue.

I checked some logs and I think the problem is in scheduling checkForMissedBlocks, it seems like new checkForMissedBlocks starts before the previous one is complete, thus blockHeights isn't updated and the last missed block is added twice.

So I changed the scheduling of checkForMissedBlocks so that in starts executing only after the previous one is finished. I ran it for some time and I think it is fixed.

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.

Issue when fixing missing block

1 participant