Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix force range for reorg checks (#126)
### TL;DR Added block range validation and optimized block header queries to prevent unnecessary reorg checks. ### What changed? - Added validation to skip reorg checks when the most recent and last checked block numbers are equal - Modified the `LookbackBlockHeaders` query to include a lower bound on block numbers, creating a specific range for querying - Enhanced logging to better indicate when reorg checks are skipped ### How to test? 1. Run the system with chain monitoring enabled 2. Verify logs show skipped reorg checks when blocks are equal 3. Confirm block header queries return results only within the specified range 4. Validate that reorg detection still functions correctly for actual reorgs ### Why make this change? The previous implementation would perform unnecessary reorg checks when block numbers were identical and could potentially query more blocks than needed. These changes improve efficiency by avoiding redundant operations and limiting the query scope to only relevant block ranges.
- Loading branch information