mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-19 18:00:39 +01:00
WalletTool: add support for the emptying out feature.
This commit is contained in:
parent
9e78268813
commit
d0a431cd9c
@ -431,6 +431,10 @@ public class WalletTool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Wallet.SendRequest req = Wallet.SendRequest.forTx(t);
|
Wallet.SendRequest req = Wallet.SendRequest.forTx(t);
|
||||||
|
if (t.getOutputs().size() == 1 && t.getOutput(0).getValue().equals(wallet.getBalance())) {
|
||||||
|
log.info("Emptying out wallet, recipient may get less than what you expect");
|
||||||
|
req.emptyWallet = true;
|
||||||
|
}
|
||||||
req.fee = fee;
|
req.fee = fee;
|
||||||
if (allowUnconfirmed) {
|
if (allowUnconfirmed) {
|
||||||
wallet.allowSpendingUnconfirmedTransactions();
|
wallet.allowSpendingUnconfirmedTransactions();
|
||||||
|
Loading…
Reference in New Issue
Block a user