8000 p2p: During block download, adjust pindexLastCommonBlock right away by willcl-ark · Pull Request #29 · willcl-ark/bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

p2p: During block download, adjust pindexLastCommonBlock right away #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

willcl-ark
Copy link
Owner

x

This allows us to calculate nWndowEnd better.
Before, it would be calculated based on an old pindexLastCommonBlock,
which could result in blocks not requested for download that could have been
requested, and peers being wrongly marked as staller.
This reverts commit 49d569c
which introduced extra logic for when a snapshot was loaded.
With the previous commit, this is not longer necessary
because the more general logic of advancing pindexLastCommonBlock
also covers this case.
getpeerinfo provides a list of blocks that are inflight, which can be used
instead.
This test (which would fail without the previous commit) checks
that after the stalling block was received, we don't incorrectly
mark another peer as a staller immediately.
@willcl-ark willcl-ark force-pushed the master branch 5 times, most recently from ca1d011 to 4fb5c73 Compare April 4, 2025 09:09
@willcl-ark willcl-ark force-pushed the 202403_ibd_lastcommonblock branch from c08c8ae to bb5aa0a Compare April 4, 2025 09:10
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
0