Skip to content

Comments

fix: actually retry failed block fetches instead of skipping them#3698

Merged
mattsse merged 1 commit intoalloy-rs:mainfrom
vanityKoa:retry
Feb 17, 2026
Merged

fix: actually retry failed block fetches instead of skipping them#3698
mattsse merged 1 commit intoalloy-rs:mainfrom
vanityKoa:retry

Conversation

@vanityKoa
Copy link
Contributor

The retry logic in NewBlocks::into_block_stream was broken: continue in a for loop advances the iterator, so failed blocks were skipped rather than retried. The shared retries counter also meant retry budget was spread across the whole batch instead of per-block.

Moved retries into an inner loop so each block gets its own retry attempts.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

LGTM — the bug analysis is correct: continue in the for loop advances to the next block number instead of retrying the current one, so failed fetches were silently skipped. The inner loop fix with per-block retries is clean and correct.

@github-project-automation github-project-automation bot moved this to Reviewed in Alloy Feb 17, 2026
@mattsse mattsse merged commit 02542e6 into alloy-rs:main Feb 17, 2026
30 checks passed
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants