mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
Send ignores an enabled avoid_reuse wallet policy #1087
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml#1087
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Automatic Send can spend reused outputs even when the wallet has
avoid_reuse=true. The same wallet’s normal RPC send respects the flag and refuses when no eligible funds are available. Send’s balance and Max calculation also disagree with its amount validation.To reproduce on regtest:
avoid_reuse=true. Fund an address, spend from it, then receive more funds at that same address. Confirm thatlistunspentmarks the new outputs asreused: true. Retain a separate clean change output.lockunspent, leaving only reused outputs available for selection.sendtoaddressfor0.01999890 BTCat1 sat/vB, without overriding avoidance. It returnsInsufficient funds.1 sat/vB, then approve it.The GUI submits the transaction. Its decoded input is a 2,000,000-sat output previously recorded as reused; it pays the intended recipient 1,999,890 sats with a 110-sat fee. The transaction appears in the wallet and local mempool, the clean output remains locked, and
avoid_reuseremains true.With avoidance disabled in an equivalent fixture, the badge and Send balances agree and Max is valid.
Automatic selection should inherit the enabled wallet policy. Available balance, Max, amount validation and transaction preparation should apply the same policy.
This is in the GUI’s coin-control setup. QML preparation leaves avoidance at its default false value, which Core treats as an opt-out. The RPC path inherits the wallet flag.
This requires an explicitly configured wallet; default GUI-created wallets leave the flag off. Bitcoin-Qt shares this limitation; related upstream discussion is gui#341. Observed on merged
qt6at6e54a48ab571, macOS / Qt 6.9, using the full application with isolated offscreen regtest fixtures.