-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recalculate listeners' best block heights on each retry
Previously, we would calculate each listener's best block height outside of the `loop`, which will have us retrying `init::synchronize_listeners` with stale data, potentially leading to panicking as we might try to connect blocks from the original height to listeners that might have been advanced by the previous itertation of the `loop` before hitting an error. Here, we mitigate this by simply retrieving the current best block height for each listener at the start of each iteration.
- Loading branch information
Showing
1 changed file
with
37 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters