mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 06:44:16 +00: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 {
|
private void processBlock(Block m) throws IOException {
|
||||||
log.trace("Received broadcast block {}", m.getHashAsString());
|
log.info("Received broadcast block {}", m.getHashAsString());
|
||||||
try {
|
try {
|
||||||
// Was this block requested by getBlock()?
|
// Was this block requested by getBlock()?
|
||||||
synchronized (pendingGetBlockFutures) {
|
synchronized (pendingGetBlockFutures) {
|
||||||
|
@ -213,8 +213,12 @@ public class Wallet implements Serializable {
|
|||||||
pendingInactive.addAll(pending.values());
|
pendingInactive.addAll(pending.values());
|
||||||
pendingInactive.addAll(inactive.values());
|
pendingInactive.addAll(inactive.values());
|
||||||
|
|
||||||
return getTransactions(true, true).size() ==
|
int size1 = getTransactions(true, true).size();
|
||||||
unspent.size() + spent.size() + pendingInactive.size() + dead.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