Wallet.completeTx: Harmonize logging of requested and effective fee/fee rate.

This commit is contained in:
Andreas Schildbach 2016-10-27 22:34:50 +02:00
parent 9cfa0a35a1
commit 2f14c76fb8

View file

@ -3929,8 +3929,8 @@ public class Wallet extends BaseTaggableObject
value = value.add(output.getValue()); value = value.add(output.getValue());
} }
log.info("Completing send tx with {} outputs totalling {} (not including fees)", log.info("Completing send tx with {} outputs totalling {} and a fee of {}/kB", req.tx.getOutputs().size(),
req.tx.getOutputs().size(), value.toFriendlyString()); value.toFriendlyString(), req.feePerKb.toFriendlyString());
// If any inputs have already been added, we don't need to get their value from wallet // If any inputs have already been added, we don't need to get their value from wallet
Coin totalInput = Coin.ZERO; Coin totalInput = Coin.ZERO;
@ -4007,12 +4007,6 @@ public class Wallet extends BaseTaggableObject
if (size > Transaction.MAX_STANDARD_TX_SIZE) if (size > Transaction.MAX_STANDARD_TX_SIZE)
throw new ExceededMaxTransactionSize(); 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 // 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 // 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. // point - the user isn't interested in a confidence transition they made themselves.