mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 23:03:04 +00:00
Move pending transactions to the top of a wallet printout. It helps debugging, as pending transactions happen to attract most problems.
This commit is contained in:
parent
5b74ea5c7b
commit
47c332eb98
@ -2280,9 +2280,9 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
|||||||
BigInteger balance = getBalance(BalanceType.ESTIMATED);
|
BigInteger balance = getBalance(BalanceType.ESTIMATED);
|
||||||
builder.append(String.format("Wallet containing %s BTC (%d satoshis) in:%n",
|
builder.append(String.format("Wallet containing %s BTC (%d satoshis) in:%n",
|
||||||
bitcoinValueToPlainString(balance), balance.longValue()));
|
bitcoinValueToPlainString(balance), balance.longValue()));
|
||||||
|
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 unspent transactions%n", unspent.size()));
|
||||||
builder.append(String.format(" %d spent transactions%n", spent.size()));
|
builder.append(String.format(" %d spent transactions%n", spent.size()));
|
||||||
builder.append(String.format(" %d pending transactions%n", pending.size()));
|
|
||||||
builder.append(String.format(" %d dead transactions%n", dead.size()));
|
builder.append(String.format(" %d dead transactions%n", dead.size()));
|
||||||
final Date lastBlockSeenTime = getLastBlockSeenTime();
|
final Date lastBlockSeenTime = getLastBlockSeenTime();
|
||||||
final String lastBlockSeenTimeStr = lastBlockSeenTime == null ? "time unknown" : lastBlockSeenTime.toString();
|
final String lastBlockSeenTimeStr = lastBlockSeenTime == null ? "time unknown" : lastBlockSeenTime.toString();
|
||||||
@ -2312,6 +2312,10 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
|||||||
|
|
||||||
if (includeTransactions) {
|
if (includeTransactions) {
|
||||||
// Print the transactions themselves
|
// Print the transactions themselves
|
||||||
|
if (pending.size() > 0) {
|
||||||
|
builder.append("\n>>> PENDING:\n");
|
||||||
|
toStringHelper(builder, pending, chain);
|
||||||
|
}
|
||||||
if (unspent.size() > 0) {
|
if (unspent.size() > 0) {
|
||||||
builder.append("\n>>> UNSPENT:\n");
|
builder.append("\n>>> UNSPENT:\n");
|
||||||
toStringHelper(builder, unspent, chain);
|
toStringHelper(builder, unspent, chain);
|
||||||
@ -2320,10 +2324,6 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
|||||||
builder.append("\n>>> SPENT:\n");
|
builder.append("\n>>> SPENT:\n");
|
||||||
toStringHelper(builder, spent, chain);
|
toStringHelper(builder, spent, chain);
|
||||||
}
|
}
|
||||||
if (pending.size() > 0) {
|
|
||||||
builder.append("\n>>> PENDING:\n");
|
|
||||||
toStringHelper(builder, pending, chain);
|
|
||||||
}
|
|
||||||
if (dead.size() > 0) {
|
if (dead.size() > 0) {
|
||||||
builder.append("\n>>> DEAD:\n");
|
builder.append("\n>>> DEAD:\n");
|
||||||
toStringHelper(builder, dead, chain);
|
toStringHelper(builder, dead, chain);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user