mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-20 10:12:19 +01:00
Print available balance in Wallet.toString(), rather than the redundant number of Satoshis.
This commit is contained in:
parent
8fdfb04e43
commit
71ee048d1e
@ -2326,9 +2326,10 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||
lock.lock();
|
||||
try {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
BigInteger balance = getBalance(BalanceType.ESTIMATED);
|
||||
builder.append(String.format("Wallet containing %s BTC (%d satoshis) in:%n",
|
||||
bitcoinValueToPlainString(balance), balance.longValue()));
|
||||
BigInteger estimatedBalance = getBalance(BalanceType.ESTIMATED);
|
||||
BigInteger availableBalance = getBalance(BalanceType.AVAILABLE);
|
||||
builder.append(String.format("Wallet containing %s BTC (available: %s BTC) in:%n",
|
||||
bitcoinValueToPlainString(estimatedBalance), bitcoinValueToPlainString(availableBalance)));
|
||||
builder.append(String.format(" %d pending transactions%n", pending.size()));
|
||||
builder.append(String.format(" %d unspent transactions%n", unspent.size()));
|
||||
builder.append(String.format(" %d spent transactions%n", spent.size()));
|
||||
|
Loading…
Reference in New Issue
Block a user