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

Merge bitcoin/bitcoin#36921: test: fix `mining_prioritisetransaction` check that always passes

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#36921: test: fix `mining_prioritisetransaction` check that always passes

3066c8e12845613f67f5572be43887e539042928 test: check the rebuilt getblocktemplate transactions after prioritisetransaction (w0xlt)

Pull request description:

`mining_prioritisetransaction.py` checks that `prioritisetransaction` alone makes `getblocktemplate` return a new block, by comparing the whole template before and after moving mocktime 10 seconds forward. But `curtime` comes from the clock, so the two templates always differ, even if the template wasn't rebuilt.

This PR checks that the deprioritised transaction drops out of the template instead.
If you remove the counter bump in `CTxMemPool::PrioritiseTransaction` (the fix this check was added for in #10196), the test from master still passes but this one fails.

ACKs for top commit:
Waridi318:
tACK 3066c8e
Sjors:
ACK 3066c8e12845613f67f5572be43887e539042928
devdavidejesus:
tACK 3066c8e12845613f67f5572be43887e539042928
mercie-ux:
tACK 3066c8e128
nebula-21:
ACK 3066c8e12845613f67f5572be43887e539042928

Tree-SHA512: 5ee4ee285903499ba1d1097e4e0e6f27f98e451069cfe77663d41ee46db55f81b51e6927d4c53591fcfabecaca7f6d7dade60ae8b46f834940e886081eae61f9
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a test-only bug in a Bitcoin Core functional test. The test was supposed to verify that calling prioritisetransaction causes getblocktemplate to rebuild its block template, but it was actually passing for the wrong reason: the two templates always differed because their timestamps came from the clock. The fix makes the test check the actual list of transactions in the template instead, so it correctly detects whether the deprioritised transaction was dropped. There is no change to production code, no vulnerability, and no security risk to users.

Recommended action

No action required. This is a test-quality improvement with no security or operational impact. Reviewers may optionally verify the new test fails if the PrioritiseTransaction counter bump is reverted, as described in the PR description.

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.