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

Merge bitcoin/bitcoin#36168: PSBT: Make input/output `Merge()` methods return void

Public commit record

What the developer wrote

Authored by merge-script

81/100 · Strong
Merge bitcoin/bitcoin#36168: PSBT: Make input/output `Merge()` methods return void

82deb69111f15db60aa364db9b06931918691564 PSBT: Make input/output `Merge()` methods return void (nebula-21)

Pull request description:

PSBT input/output `Merge()` methods always return `true` unconditionally and have no failure paths. As a result, the return value checks in `PartiallySignedTransaction::Merge()` can never fail and are dead code.
This makes the `bool` return type and `[[nodiscard]]` misleading.

This PR changes both methods to return `void` and remove the return value checks. If at some point in the future the failure logic is needed, it can be introduced again. For now using `void` makes the current behavior easier to understand.

ACKs for top commit:
achow101:
ACK 82deb69111f15db60aa364db9b06931918691564
polespinasa:
ACK 82deb69111f15db60aa364db9b06931918691564
sedited:
ACK 82deb69111f15db60aa364db9b06931918691564

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

What changed, and why it matters

This commit is a straightforward code cleanup in Bitcoin Core's Partially Signed Bitcoin Transaction (PSBT) handling. It changes two internal methods from returning true (always, with no way to fail) to returning nothing at all, and removes now-unnecessary error checks. There is no security bug being fixed and no change in behavior for users.

Recommended action

No security action required. Treat as normal code-quality refactor.

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.