Skip to content

Conversation

@oskarszoon
Copy link
Contributor

@oskarszoon oskarszoon commented Nov 7, 2025

The wait for assembly can be increased since #88 was fixed

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

🤖 Claude Code Review

Status: Complete

This PR improves legacy sync behavior by making the block assembly wait timeout configurable and improving logging during sync operations. The changes are well-structured with proper documentation.

Observations:

The changes look solid overall. The configurable maxBlocksBehind parameter (defaulting to 20 blocks) is a reasonable improvement over the hardcoded value of 1, and the headers-first network speed check fix addresses a legitimate issue where peers would be incorrectly penalized for slow speeds during header-only downloads.

The linear backoff change (20ms base * 4x multiplier vs exponential) and tiered logging (DEBUG for first 5 attempts, then WARN) should reduce log noise while maintaining visibility into persistent issues.

All call sites have been correctly updated to pass the new parameter, and the test fixtures have been adjusted appropriately.

@oskarszoon oskarszoon self-assigned this Nov 7, 2025
@oskarszoon oskarszoon merged commit 2d50721 into bsv-blockchain:main Nov 10, 2025
10 checks passed
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.

2 participants