AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

Merge bitcoin/bitcoin#36830: test: make `tx_mempool_block_doublespend` cases independent

Public commit record

What the developer wrote

Authored by merge-script

100/100 · Strong
Merge bitcoin/bitcoin#36830: test: make `tx_mempool_block_doublespend` cases independent

0d98c438ebc124ca4252bdd2855d62691e030e58 test: make tx_mempool_block_doublespend spends conflicting (Alexander Wiederin)
07540640aa49e357b78523efc4f6c13c3a51a5cc test: split tx_mempool_block_doublespend into independent test cases (Alexander Wiederin)

Pull request description:

Found during #36692: remove test state that is shared and modified across cases.

`tx_mempool_block_doublespend` ran four cases against one chain and mempool, removing each case’s mempool transaction by hand before the next one. Each case is now its own test with a fresh setup that builds the two spends. The first commit also fixes the last case’s comment, which had the mempool and block spends reversed. The checks are unchanged.

The second commit makes the two spends distinct transactions. Previously they were identical (deterministic signing), so in the last case the mempool transaction was removed because it was mined rather than as a conflict. The rejection cases are unaffected: they fail with `bad-txns-inputs-missingorspent` either way.

ACKs for top commit:
yuvicc:
lgtm ACK 0d98c438ebc124ca4252bdd2855d62691e030e58
maflcko:
review ACK 0d98c438ebc124ca4252bdd2855d62691e030e58 🏉
janb84:
ACK 0d98c438ebc124ca4252bdd2855d62691e030e58

Tree-SHA512: 41694acb096a9763bf8f15ad1c39ec84a318136021eb239c3b98ab388e14b628967b2056a0fa1a1d4f181c212b3dd48f15fef0b018d649b609157ce893b79b3e
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit only changes a test file. It reorganizes an existing test into four separate, independent test cases and makes the two test transactions slightly different so the test correctly checks that a mempool transaction is rejected as a conflict when a block contains a competing spend. No production code is changed, so this cannot affect real Bitcoin Core behavior or introduce a security vulnerability.

Recommended action

No action needed. This is a test-only refactor that improves test clarity and correctness. Review as normal code quality/test change.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.