mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-18 21:32:35 +01:00
Wallet: use forEach()
to add inputs to req.tx
in completeTx()
This commit is contained in:
parent
74b7b11681
commit
9f76385c9d
@ -4589,8 +4589,8 @@ public class Wallet extends BaseTaggableObject
|
|||||||
log.info(" emptying {}", bestCoinSelection.totalValue().toFriendlyString());
|
log.info(" emptying {}", bestCoinSelection.totalValue().toFriendlyString());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (TransactionOutput output : bestCoinSelection.outputs())
|
bestCoinSelection.outputs()
|
||||||
req.tx.addInput(output);
|
.forEach(req.tx::addInput);
|
||||||
|
|
||||||
if (req.emptyWallet) {
|
if (req.emptyWallet) {
|
||||||
if (!adjustOutputDownwardsForFee(req.tx, bestCoinSelection, req.feePerKb, req.ensureMinRequiredFee))
|
if (!adjustOutputDownwardsForFee(req.tx, bestCoinSelection, req.feePerKb, req.ensureMinRequiredFee))
|
||||||
|
Loading…
Reference in New Issue
Block a user