novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

SendRequest.emptyWallet sends estimated coins #438

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I had received 0.4 BTC confirmed, 0.3 BTC unconfirmed. I wanted to send 0.4 BTC 
and entered 0.4 BTC (which sets the emptyWallet flag). Bitcoinj created a 0.7 
BTC transaction.

This is in contrast to the JavaDoc: "When emptyWallet is set, all available 
coins are sent..."

The tx has not yet confirmed, because of the unconfirmed 0.3 BTC but I see no 
reason why it should not confirm.

This is rather severe, as it can lead to severe overpaying. The empty wallet 
feature is live since 2 days. I adjusted the priority to high.

Original issue reported on code.google.com by andreas....@gmail.com on 14 Aug 2013 at 6:10

GoogleCodeExporter commented 9 years ago
The overpaying tx has been confirmed as expected, so I "lost" 0.3 Testnet BTC.

Yes, I think even if the flag is called "emptyWallet" it should only select 
coins that can be sent. Unconfirmed change it should select. Unconfirmed 
incoming coins it should not select, because they cannot be sent and who knows 
if they will ever confirm? If they do, the user can use emptyWallet a second 
time.

Original comment by andreas....@gmail.com on 15 Aug 2013 at 9:31

GoogleCodeExporter commented 9 years ago
This issue was closed by revision e05abe150bb5.

Original comment by hearn@google.com on 15 Aug 2013 at 10:32

GoogleCodeExporter commented 9 years ago
This issue was closed by revision d8f7eab42be3.

Original comment by hearn@google.com on 15 Aug 2013 at 3:46