Background
Using lncli sendcoins while manually selecting multiple utxos using multiple --utxo flags combined with the --sweepall flag leads to the wrong confirmation Amount to be shown.
Your environment
lnd version 0.18.3-beta commit=v0.18.3-beta
Linux 4.18.0-553.22.1.el8_10.x86_64
- Bitcoin Core
v26.0.0 backend
Steps to reproduce
[bitcoin@lnd ~]$ lncli listunspent | grep 'outpoint\|amount_sat'
"amount_sat": 1000000,
"outpoint": "<txid1>:0",
"amount_sat": 1000000,
"outpoint": "<txid2>0",
"amount_sat": 1000000,
"outpoint": "<txid3>:0",
"amount_sat": 500000,
"outpoint": "<txid4>:0",
[bitcoin@lnd ~]$ lncli sendcoins --sat_per_vbyte 2 --utxo <txid1>:0 --utxo <txid2>:0 --utxo <txid3>:0 --sweepall --addr <recv_addr>
Amount: 3500000
Destination address: <recv_addr>
Confirm payment (yes/no):
Expected behaviour
The confirmation Amount should show only the sum of sats for selected UTXOs instead of the sum of sats for all available UTXOs. In the above example it should show 3000000 sats.
Actual behaviour
The confirmation prompt shows 3500000 instead as the sendcoins amount, which includes the sats for <txid4>:0 which was not included in the sendcoins command.
This is confusing because when you actually proceed with the transaction and type yes at the prompt, the sendcoins command works correctly and only sends out 3000000 sats. The bug is only visual at the confirmation prompt.
Background
Using
lncli sendcoinswhile manually selecting multiple utxos using multiple--utxoflags combined with the--sweepallflag leads to the wrong confirmation Amount to be shown.Your environment
lnd version 0.18.3-beta commit=v0.18.3-betaLinux 4.18.0-553.22.1.el8_10.x86_64v26.0.0backendSteps to reproduce
Expected behaviour
The confirmation Amount should show only the sum of sats for selected UTXOs instead of the sum of sats for all available UTXOs. In the above example it should show 3000000 sats.
Actual behaviour
The confirmation prompt shows 3500000 instead as the sendcoins amount, which includes the sats for
<txid4>:0which was not included in the sendcoins command.This is confusing because when you actually proceed with the transaction and type
yesat the prompt, the sendcoins command works correctly and only sends out 3000000 sats. The bug is only visual at the confirmation prompt.