Skip to content

[31.x] Backports - #36662

Merged
fanquake merged 4 commits into
bitcoin:31.xfrom
fanquake:36358_36361
Oct 26, 2026
Merged

fanquake merged 4 commits into
bitcoin:31.xfrom
fanquake:36358_36361

Conversation

@fanquake

Copy link
Copy Markdown
Member

andrewtoth and others added 4 commits October 26, 2026 13:02
Keep private broadcast connections outside normal discouragement handling.
Misbehaving private broadcast peers are still disconnected.

Github-Pull: bitcoin#36312
Rebased-From: eab6630
LoadBlockIndex() adds to m_blocks_unlinked based only on nTx > 0, without
checking BLOCK_HAVE_DATA. Pruning preserves nTx but clears BLOCK_HAVE_DATA,
so a pruned block whose parent was header-only gets re-added on every
restart, causing the CheckBlockIndex() assertion that entries must have
data on disk to fail.

Check that BLOCK_HAVE_DATA is set before inserting into m_blocks_unlinked.

Fixes bitcoin#35050.

Github-Pull: bitcoin#35168
Rebased-From: 0e4b0ba
A pruned stale-fork block whose parent doesn't have any transactions
shouldn't be added to m_blocks_unlinked when starting up a node.

Github-Pull: bitcoin#35168
Rebased-From: 3f44f9a
@fanquake fanquake added this to the 31.2 milestone Oct 26, 2026
@DrahtBot

DrahtBot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK marcofleon, sedited

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

@rreview

This comment was marked as low quality.

@sedited

sedited commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

The Ralph finding looks like nothing to me.

@marcofleon marcofleon left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 1bb872a

I think Ralph would maybe be right if the test's chain started from genesis and the fork was at the second block. But that's not the case for this test, as the fork happens at block 201.

C'mon Ralph...

@sedited sedited left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 1bb872a

@fanquake
fanquake merged commit f2fe67f into bitcoin:31.x Oct 26, 2026
26 checks passed
@fanquake
fanquake deleted the 36358_36361 branch October 26, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants