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

Merge bitcoin/bitcoin#36831: test: split `test_IsStandard` into independent test cases

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#36831: test: split `test_IsStandard` into independent test cases

608b99a0d87ca208bd421dbb76b44966f3ea195f test: move IsStandardTx tests to transaction_standardness_tests.cpp (yuvicc)
083811f6784845478db68b803ebeea384ea240d7 test: build IsStandard test transactions declaratively (yuvicc)
748fb10ed5ba4cc2f3ab6d1ffe5f3920a42ef8f0 test: split test_IsStandard into independent test cases (yuvicc)
a6e6de455f255638fd9eec7274260f60ecf13ad7 test: pass policy to IsStandard checks instead of using globals (yuvicc)

Pull request description:

Part of #36692: This splits it into one test case per policy rule, each building its own transaction.

The first commit replaces `g_dust` and `g_bare_multi` globals by a `StandardPolicy` struct, which defaults to the node defaults and is passed to each check, e.g. `CheckIsStandard(t, {.max_op_return_relay = 83})`, so no case changes policy for another.

Second commit splits `test_IsStandard` into independent test cases i.e. one test case per policy rule. Each starts from its own standard transaction built by a new `MakeTx` helper. Since transactions are no longer carried over between checks, some values that are irrelevant to the rule under test differ from before.

Third commit builds `IsStandard` test transactions declaratively. Each check constructs its transaction in one expression instead of mutating a shared one. `CheckDustThreshold` helper also deduplicates repeated "not dust at the threshold, dust one satoshi below" from test cases.

ACKs for top commit:
maflcko:
review ACK 608b99a0d87ca208bd421dbb76b44966f3ea195f 💽
janb84:
re ACK 608b99a0d87ca208bd421dbb76b44966f3ea195f
sedited:
ACK 608b99a0d87ca208bd421dbb76b44966f3ea195f

Tree-SHA512: 32a195de08c755b3c46d9407cfde9d6de114bd235e09495f9cc78b558b47ac410ffa905ddc31664fd3230a4b4cfac7b73b70265bcc22c06baa7d35f3a3c18963
✓ 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 only reorganizes and splits existing test code. It moves the IsStandardTx tests into a new file, breaks one big test into smaller independent test cases, and replaces shared global test settings with a local policy struct. There is no change to the actual Bitcoin Core node code that runs on the network, so this cannot affect security or behavior of live software.

Recommended action

No security action needed. Treat as normal test maintenance.

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.