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

Merge bitcoin/bitcoin#36071: refactor: fuzz: remove cost_of_change from coin-grinder fuzz target

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#36071: refactor: fuzz: remove cost_of_change from coin-grinder fuzz target

5ec6446a1b83e673a51d9e86fa4c0c0e9930fccc refactor: fuzz: remove cost_of_change from coin-grinder fuzz target (yancy)

Pull request description:

coin-grinder selection algorithm does not take cost_of_change as a parameter.

> CoinGrinder doesn’t use coin_params.m_cost_of_change and the comparison of selection results from CoinGrinder, SRD, and Knapsack does not need it either as only the weight of the selections is relevant. So, [line 96](https://github.com/bitcoin/bitcoin/blob/2990bd773551c835ab0b6b59d85730adab2fd428/src/wallet/test/fuzz/coinselection.cpp#L96) in that fuzz test is both incorrect and dead code. It should be removed.

cite: [stackexchange](https://bitcoin.stackexchange.com/questions/130861/difference-between-long-term-fee-rate-and-discard-fee-rate)

verified `coin_grinder` fuzz target still works after removal

ACKs for top commit:
brunoerg:
ACK 5ec6446a1b83e673a51d9e86fa4c0c0e9930fccc
frankomosh:
ACK 5ec6446a1b83e673a51d9e86fa4c0c0e9930fccc

Tree-SHA512: 46c4d5e22e342fdac918e52348b346a18b41478b0a8859675ee38819b45c57cc8a617bad507f3e810d346534d6875175f44ae1599533b3acc8123dafc1f69f14
✓ 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 removes one unused line from a fuzz test (a type of automated test that throws random data at code to find bugs). The removed line set a 'cost of change' value that the CoinGrinder coin-selection algorithm never actually reads. The change only affects test code, not the real Bitcoin wallet, and does not fix or introduce any security issue.

Recommended action

No security action required. This is a code-quality/test-only 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.