Skip to content
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

Backport fix for INV buffer #314

Merged
merged 3 commits into from
Sep 7, 2024
Merged

Backport fix for INV buffer #314

merged 3 commits into from
Sep 7, 2024

Conversation

Asherda
Copy link

@Asherda Asherda commented Sep 7, 2024

Cherry-picked from zcash#6927

TheBlueMatt and others added 3 commits September 6, 2024 21:05
(cherry picked from commit bitcoin/bitcoin@037159c)

Zcash: Adapted for our lack of direct headers announcement.

(cherry picked from commit zcash/zcash/df24ea9bd29e13c018c389e32f8e6c669786b173)
vToFetch is never used after declaration. When checked if not empty,
evaluation is always false. Best case scenario this is optimized by the
compiler, worst case it wastes  cpu cycles.  It should be removed either
way.

(cherry picked from commit bitcoin/bitcoin@c707ca8)

Zcash: Adjusted for us not having backported various refactors.
(cherry picked from commit 814e320)
Headers-first is the primary method of announcement on the network. If a
node fell back sending blocks by inv, it's probably for a re-org. The
final block hash provided should be the highest, so send a getheaders
and then fetch the blocks we need to catch up.

(cherry picked from commit bitcoin/bitcoin@7467366)

Zcash: Adjusted for us not having backported various refactors.

(cherry picked from commit zcash/zcash/52cd44c7c80f0255fe6a5b8dc73c8343aade2501)
@miketout miketout merged commit 15cd1a3 into miketout:dev Sep 7, 2024
@Asherda Asherda deleted the inv-buffer branch October 14, 2024 02:12
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.

4 participants