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

wallet: Remove COutput::spendable and AvailableCoinsListUnspent

Public commit record

What the developer wrote

Authored by Ava Chow

73/100 · Adequate
wallet: Remove COutput::spendable and AvailableCoinsListUnspent

In descriptor wallets, we consider all outputs to be spendable as we no
longer have mixed mine and watchonly in a wallet. As such,
COutput::spendable is meaningless and can be removed.

Furthermore, CoinFilterParams::only_spendable can be removed as that was
essentially checking for COutput::spendable.

Lastly, AvailableCoinsListUnspent can also be removed as the wrapper is
now only setting the feerate to std::nullopt which is trivial enough that
a dedicated wrapper is not needed.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit cleans up the Bitcoin Core wallet code by removing an old 'spendable' flag that is no longer meaningful for modern descriptor wallets. For these wallets, every coin the wallet knows about is considered spendable, so the flag was redundant. The change also removes a small wrapper function and updates the listunspent RPC to always report 'spendable' as true. It is a code-simplification refactor, not a fix for an active security bug.

Recommended action

No immediate action required. Reviewers and operators should note that listunspent's 'spendable' field is deprecated and now always true for descriptor wallets. If running legacy wallet setups, verify behavior separately, though this commit targets descriptor-wallet semantics.

Security signals we found

01

Removal of spendability filter in coin selection

02

RPC field 'spendable' now hardcoded to true and marked deprecated

03

ListCoins no longer guards on coin.spendable || (disable_private_keys && coin.solvable)

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 3/15
Confidence 8/10
Evidence quality 4/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.