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

bench: fix ephemeral spend inputs

Public commit record

What the developer wrote

Authored by Lőrinc

68/100 · Adequate
bench: fix ephemeral spend inputs

`MempoolCheckEphemeralSpends` wrote every prevout to `tx2.vin[0]` instead of `tx2.vin[i]`.
That left only one child input pointing at the parent transaction, while the remaining inputs kept default prevouts.

Write each prevout to `vin[i]` instead.
Add an assertion that the last child input spends the last parent output.

Co-authored-by: David Gumberg <davidzgumberg@gmail.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in a Bitcoin Core benchmark test, not in the live network code. The benchmark was supposed to create a test transaction with multiple inputs spending outputs from a parent transaction, but due to a typo it kept writing all the input details to the first input slot only. The remaining inputs were left empty/default. The fix writes each input to its correct slot and adds a sanity check. It does not affect real Bitcoin transactions, wallets, or consensus rules.

Recommended action

No security action required. Treat as a normal code-quality/test-fix merge. Reviewers may optionally verify the benchmark now exercises the intended multi-input ephemeral-spend scenario.

Security signals we found

01

Bug is confined to benchmark code (src/bench/)

02

No change to consensus, mempool policy, P2P, wallet, or RPC code

03

No externally reachable attack surface introduced or removed

04

Fix adds an assertion, improving test correctness

Risk score

Why this scored 16/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 9/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.