You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### TL;DR
Changed block gap handling to poll missing blocks instead of marking them as failures.
### What changed?
- Replaced the block failure recording mechanism in `handleGap` with a new polling approach
- Created a new `BoundlessPoller` that can poll arbitrary block ranges
- Refactored the `Poller` to extract common functionality into `BoundlessPoller`
- Updated tests to reflect the new polling behavior
### How to test?
1. Run the indexer with a gap in block sequence
2. Verify that missing blocks are now polled and processed
3. Confirm that blocks are properly indexed instead of being marked as failures
4. Run unit tests to verify the new gap handling behavior
### Why make this change?
The previous implementation would mark missing blocks as failures without attempting to retrieve them. This new approach actively tries to fetch and process missing blocks, improving indexing speed
returnfmt.Errorf("error storing block failures while handling gap: %v", err)
214
-
}
187
+
poller:=NewBoundlessPoller(c.rpc, c.storage)
188
+
log.Debug().Msgf("Polling %d blocks while handling gap: %v", len(missingBlockNumbers), missingBlockNumbers)
189
+
poller.Poll(missingBlockNumbers)
215
190
returnfmt.Errorf("first block number (%s) in commit batch does not match expected (%s)", actualFirstBlock.Number.String(), expectedStartBlockNumber.String())
0 commit comments