You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
qt: coin control's change preview shows change that the wallet adds to the fee #365
With coin control enabled, the Send page's coin-control panel can show change that the wallet then adds to the fee. The fee and total in the send confirmation are correct; only the preview is wrong. Line numbers are at 1.x.x993ab7531f.
What happens
CoinControlDialog::updateLabels (src/qt/coincontroldialog.cpp:488-503) decides whether change survives by testing it as dust: it uses a 24-byte dummy script at the dust relay fee. The wallet decides differently. It drops change whose value is below the cost of creating and later spending it at the discard rate. Since #346, with no fee estimate, that rate is the fallback rate. A one-input P2MR transaction is about 3.8 kvB, so the wallet's threshold is far above the dust limit, and the preview keeps change the wallet drops.
Reproduce (regtest, no fee estimates, 250 sat/kvB fallback)
Enable coin control (Settings ▸ Options ▸ Wallet ▸ Enable coin control features).
In a wallet holding 0.01 QBT coins, select one coin under Inputs… and pay 0.00998 QBT to another address.
The panel shows "Change: ≈0.00001039".
The confirmation shows a fee of 0.00002000 and a total of 0.01000000. The broadcast transaction has one output and no change, which is correct.
With a 0.0099 payment, the change of about 0.00009 is shown and kept, as expected. In testing, the wallet kept change from about 0.0000288 QBT upward.
Expected
The preview applies the wallet's change-discard rule, or marks change below that threshold as going to the fee. Upstream has the same dust-based preview. qbit's large P2MR inputs make the difference visible.
Found during the #174 v1.0.1 release testing (qbit-qt on Linux).
Activity
doc: correct the v1.0.1 release notes from the launch review
doc: correct the v1.0.1 release notes from the launch review
doc: correct the v1.0.1 release notes from the launch review
release: prepare v1.0.1 (#181)
release: prepare v1.0.1 (#181)