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

Merge bitcoin/bitcoin#36696: CTransaction: Add constructor taking inputs and outputs

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#36696: CTransaction: Add constructor taking inputs and outputs

3ffffa071c2eeaa61ad4ff111a8ab53cdbc9cbec test: Demonstrate new CTransaction constructor in sigopcount_tests (Daniel Pfeifer)
eeac75977a41ccf40efe2e81ba6c20654b9233a1 CTxIn: Accept scriptWitness in constructor (Daniel Pfeifer)
5d48cd381b4cf5afdf5f86917bdce3712d6fa55b CTransaction: Add a value constructor (Daniel Pfeifer)

Pull request description:

Part of #36692. Please view this PR in context of changes like https://github.com/bitcoin/bitcoin/pull/36694.

`CTransaction` gains a constructor that allows direct declarative construction as an alternative to building through `CMutableTransaction`. `CTxIn`'s constructors gain an optional argument to pass the script witness.

ACKs for top commit:
yuvicc:
cr-ACK 3ffffa071c2eeaa61ad4ff111a8ab53cdbc9cbec
alexanderwiederin:
ACK 3ffffa071c2eeaa61ad4ff111a8ab53cdbc9cbec
hodlinator:
re-ACK 3ffffa071c2eeaa61ad4ff111a8ab53cdbc9cbec
janb84:
re-ACK 3ffffa071c2eeaa61ad4ff111a8ab53cdbc9cbec
optout21:
ACK 3ffffa071c2eeaa61ad4ff111a8ab53cdbc9cbec
sedited:
ACK 3ffffa071c2eeaa61ad4ff111a8ab53cdbc9cbec

Tree-SHA512: 9bb9c43bdc309a523add1a0446c9f08c86ce6140f8e31ac4cbe4f016801afeccf620c9e816a0761040c7122249b7b383e9485c48a327aca5e83da809f86a6454
✓ 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 is a routine code cleanup in Bitcoin Core. It adds a new, more convenient way to create transaction objects directly, instead of always going through a mutable intermediate. It also lets transaction inputs carry their witness data in the constructor. The changes are purely structural and do not alter how transactions are validated, serialized, or accepted by the network.

Recommended action

No security action required. This is a benign refactoring commit.

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.