Peer.java: change trace to info on receiving a block

Wallet.java: print more info to logs if wallet sizes are inconsistent
This commit is contained in:
Mike Hearn 2012-04-06 13:39:41 +02:00
parent b7379d562f
commit c400a7c756
2 changed files with 7 additions and 3 deletions

View File

@ -315,7 +315,7 @@ public class Peer {
}
private void processBlock(Block m) throws IOException {
log.trace("Received broadcast block {}", m.getHashAsString());
log.info("Received broadcast block {}", m.getHashAsString());
try {
// Was this block requested by getBlock()?
synchronized (pendingGetBlockFutures) {

View File

@ -213,8 +213,12 @@ public class Wallet implements Serializable {
pendingInactive.addAll(pending.values());
pendingInactive.addAll(inactive.values());
return getTransactions(true, true).size() ==
unspent.size() + spent.size() + pendingInactive.size() + dead.size();
int size1 = getTransactions(true, true).size();
int size2 = unspent.size() + spent.size() + pendingInactive.size() + dead.size();
if (size1 != size2) {
log.error("Inconsistent wallet sizes: {} {}", size1, size2);
}
return size1 == size2;
}
/**