mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 21:47:18 +00:00
Print byte size of transactions in wallet dump.
This commit is contained in:
@@ -692,9 +692,11 @@ public class Transaction extends ChildMessage {
|
||||
s.append('\n');
|
||||
}
|
||||
final Coin fee = getFee();
|
||||
if (fee != null)
|
||||
s.append(" fee ").append(fee.multiply(1000).divide(unsafeBitcoinSerialize().length).toFriendlyString())
|
||||
.append("/kB, ").append(fee.toFriendlyString()).append(" total\n");
|
||||
if (fee != null) {
|
||||
final int size = unsafeBitcoinSerialize().length;
|
||||
s.append(" fee ").append(fee.multiply(1000).divide(size).toFriendlyString()).append("/kB, ")
|
||||
.append(fee.toFriendlyString()).append(" for ").append(size).append(" bytes\n");
|
||||
}
|
||||
if (purpose != null)
|
||||
s.append(" prps ").append(purpose).append('\n');
|
||||
return s.toString();
|
||||
|
||||
@@ -4202,8 +4202,9 @@ public class Wallet extends BaseTaggableObject
|
||||
|
||||
final Coin calculatedFee = req.tx.getFee();
|
||||
if (calculatedFee != null)
|
||||
log.info(" with a fee of {}/kB, {} total",
|
||||
calculatedFee.multiply(1000).divide(size).toFriendlyString(), calculatedFee.toFriendlyString());
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user