From 2f14c76fb84a66e4dba840a8920e14d7cf664cae Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Thu, 27 Oct 2016 22:34:50 +0200 Subject: [PATCH] Wallet.completeTx: Harmonize logging of requested and effective fee/fee rate. --- core/src/main/java/org/bitcoinj/wallet/Wallet.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/wallet/Wallet.java b/core/src/main/java/org/bitcoinj/wallet/Wallet.java index d12e68ea..d666b9df 100644 --- a/core/src/main/java/org/bitcoinj/wallet/Wallet.java +++ b/core/src/main/java/org/bitcoinj/wallet/Wallet.java @@ -3929,8 +3929,8 @@ public class Wallet extends BaseTaggableObject value = value.add(output.getValue()); } - log.info("Completing send tx with {} outputs totalling {} (not including fees)", - req.tx.getOutputs().size(), value.toFriendlyString()); + log.info("Completing send tx with {} outputs totalling {} and a fee of {}/kB", req.tx.getOutputs().size(), + value.toFriendlyString(), req.feePerKb.toFriendlyString()); // If any inputs have already been added, we don't need to get their value from wallet Coin totalInput = Coin.ZERO; @@ -4007,12 +4007,6 @@ public class Wallet extends BaseTaggableObject if (size > Transaction.MAX_STANDARD_TX_SIZE) throw new ExceededMaxTransactionSize(); - final Coin calculatedFee = req.tx.getFee(); - if (calculatedFee != null) - log.info(" with a fee of {}/kB, {} for {} bytes", - calculatedFee.multiply(1000).divide(size).toFriendlyString(), calculatedFee.toFriendlyString(), - size); - // Label the transaction as being self created. We can use this later to spend its change output even before // the transaction is confirmed. We deliberately won't bother notifying listeners here as there's not much // point - the user isn't interested in a confidence transition they made themselves.