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

Merge bitcoin/bitcoin#37110: test: fix ineffective checks in rpc_psbt.py

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#37110: test: fix ineffective checks in rpc_psbt.py

6e1d96fc02a4959c26ab599e952d10cd712e0aab test: check all inputs after joinpsbts in rpc_psbt.py (Sebastian Falbesoner)
435407a4886c9e6cc43252e47b4e848b069219d8 test: fix tap tree absence check in rpc_psbt.py (Sebastian Falbesoner)
b14d342e32da34d048196a7a5600b250ff2910bf test: fix non_witness_utxo check in rpc_psbt.py (Sebastian Falbesoner)

Pull request description:

This PR fixes three assertions in `rpc_psbt.py` could pass without testing what they were meant to test:

- `test_utxo_conversion` checked for the misspelled key `not_witness_utxo` (introduced in 3dd2f6461b4bb28b2b212c691a3df28ac793ad91) , so the check could never fail.
- The `PSBT_OUT_TAP_TREE` absence check (added in 22c051ca70) looked at the raw `createpsbt` result for a non-taproot output, so it passed trivially. It now checks the `walletprocesspsbt` result for a bech32m output and also asserts that the taproot internal key is present.
- After `joinpsbts`, only `inputs[3]` was checked for removed final scripts. Since the joined inputs are shuffled and only one of them is finalized, this hit the right input in about one out of four runs. As far as I can tell, this is the only test coverage of the PSBTv0 path in `AddInput` that clears these fields.

ACKs for top commit:
sedited:
ACK 6e1d96fc02a4959c26ab599e952d10cd712e0aab

Tree-SHA512: e1c36b2afadae679a97e26b7c9770456a27816a6a471cffeff18637e865fe252b23c330cd2bca1aca9a1e6e2eafb0d4aed83b381dd02429d61a4861d92351b7d
✓ 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 three mistakes in Bitcoin Core's automated test file rpc_psbt.py. The tests were accidentally written in ways that meant they would always pass, even if the feature they were supposed to check was broken. The fixes correct a typo in a key name, check the right PSBT data after wallet processing, and verify all joined inputs instead of just one. There is no change to the actual Bitcoin node code that users run, only to the test suite, so this cannot directly affect live wallets or the network.

Recommended action

No security action required. Treat as a normal test-quality improvement. Reviewers may optionally verify that the corrected assertions now exercise the intended PSBT behavior.

Security signals we found

01

test-only change

02

no production code modified

03

fixes ineffective assertions in functional tests

04

no runtime behavior change to Bitcoin Core

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.