Improve logs

Cleanups
This commit is contained in:
chimp1984 2020-12-28 13:18:45 -05:00
parent 768541664b
commit 1fc8905634
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3
2 changed files with 3 additions and 4 deletions

View file

@ -230,8 +230,7 @@ public abstract class BsqNode implements DaoSetupService {
try {
Block block = blockParser.parseBlock(rawBlock);
if (pendingBlocks.contains(rawBlock))
pendingBlocks.remove(rawBlock);
pendingBlocks.remove(rawBlock);
// After parsing we check if we have pending blocks we might have received earlier but which have been
// not connecting from the latest height we had. The list is sorted by height

View file

@ -149,7 +149,7 @@ public class RequestBlocksHandler implements MessageListener {
log.error(errorMessage);
handleFault(errorMessage, nodeAddress, CloseConnectionReason.SEND_MSG_FAILURE);
} else {
log.trace("We have stopped already. We ignore that networkNode.sendMessage.onFailure call.");
log.warn("We have stopped already. We ignore that networkNode.sendMessage.onFailure call.");
}
}
}, MoreExecutors.directExecutor());
@ -175,7 +175,7 @@ public class RequestBlocksHandler implements MessageListener {
// have the address set. As we check the nonce later we do not care that much for the check if the
// connection address is the same as the one we used.
} else if (!optionalNodeAddress.get().equals(nodeAddress)) {
log.warn("Peers node address is the same we requested. We ignore that message.");
log.warn("Peers node address is not the same we used for the request. This is not expected. We ignore that message.");
return;
}