mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-19 05:33:44 +01:00
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:
parent
b7379d562f
commit
c400a7c756
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user