mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
Send fee preview uses a different change-output type from transaction preparation #1104
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#1104
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?
The Send form can size its dummy change output differently from the change output Core creates for Review. This produces an avoidable fee and total difference even with a fixed payment, one input and an unchanged fee rate.
To reproduce:
-changetypeoverride.The form shows a fee of 153 sats and a total of 0.50000153 BTC. Review shows 165 sats and 0.50000165 BTC. The exported PSBT also pays a 165-sat fee, and the signed transaction is 165 vB.
The same fixture produced:
The GUI's preview selector falls back to
getDefaultAddressType(), then pins a dummy destination of that type. Transaction preparation lets Core select the actual change type. In the Taproot case, the preview sizes P2WPKH change while the prepared transaction uses P2TR change, accounting for the 12-vbyte difference.Related to closed #715: use a non-persistent dummy destination whose script size follows the actual change policy. Review remains authoritative; this report concerns the known change-type mismatch rather than requiring every estimate to equal the final transaction.
Observed on
qt6ateed1f426fcb6, macOS arm64 / Qt 6.9, using the full application with isolated offscreen regtest profiles. Review, exported fees and recipient amounts were correct in all four cases. The test payments were not broadcast.+1
Ran into the same thing on signet (sending to a Taproot address at 2 sat/vB, the Send form showed 286 sats and Review showed 310)