Skip to content

Conversation

@incrypto32
Copy link
Member

The _is_duplicate_batch check was incorrectly skipping batches based only on comparing ranges to the previous batch. This is wrong because, Proper duplicate detection is handled by state_store.is_processed() in load_stream_continuous, which checks against ALL processed batches

The _is_duplicate_batch check was incorrectly skipping batches based only
on comparing ranges to the previous batch. This is wrong because:
1. Proper duplicate detection is handled by state_store.is_processed() in
   load_stream_continuous, which checks against ALL processed batches
2. The range-only comparison does not check hashes, so batches with same
   ranges but different data (after reorg) would be incorrectly skipped
3. After crash/restart, prev_ranges_by_network is empty anyway
@incrypto32 incrypto32 requested a review from fordN January 11, 2026 13:11
Copy link
Contributor

@fordN fordN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

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.

3 participants