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

test: fix P2SH output in coins cache fuzz

Public commit record

What the developer wrote

Authored by Lőrinc

90/100 · Strong
test: fix P2SH output in coins cache fuzz

The `coinscache_sim` fuzz target builds a 23-byte P2SH scriptPubKey manually.
Place `OP_EQUAL` at index 22, after `OP_HASH160`, the 20-byte push opcode, and the 20-byte script hash.
This matches `CScript::IsPayToScriptHash()`, which checks byte 22 for `OP_EQUAL`, see src/script/script.cpp#L229
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a bug in a Bitcoin Core fuzz test (a randomized testing harness), not in the main Bitcoin software. The test was building a sample P2SH (pay-to-script-hash) output incorrectly by placing an 'OP_EQUAL' instruction at byte 12 instead of byte 22. This only affects the test's internal data setup and has no effect on real transactions, wallets, or network behavior. The second change is a trivial typo fix in a comment.

Recommended action

No security action required. Treat as a normal test-quality fix.

Security signals we found

01

Test-only code change

02

Incorrect P2SH scriptPubKey construction in fuzz harness

03

No production consensus, networking, or wallet code modified

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.