3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 07:12:17 +00:00

More logging in Peer/PeerGroup

This commit is contained in:
Mike Hearn 2012-04-06 14:36:54 +02:00
parent c400a7c756
commit b3e092a5e8
2 changed files with 3 additions and 1 deletions

View File

@ -212,7 +212,7 @@ public class Peer {
} catch (IOException e) {
if (!running) {
// This exception was expected because we are tearing down the socket as part of quitting.
log.info("Shutting down peer loop");
log.info("{}: Shutting down peer loop", address);
} else {
disconnect();
throw new PeerException(e);

View File

@ -325,6 +325,7 @@ public class PeerGroup {
// This is run with the peer group already locked.
for (Peer peer : peers) {
try {
log.info("{}: Sending transaction {}", peer.getAddress(), tx.getHashAsString());
peer.sendMessage(tx);
} catch (IOException e) {
log.warn("Caught IOException whilst sending transaction: {}", e.getMessage());
@ -685,6 +686,7 @@ public class PeerGroup {
boolean success = false;
for (Peer p : announceToPeers) {
try {
log.info("{}: Announcing {} pending wallet transactions", p.getAddress(), inv.getItems().size());
p.sendMessage(inv);
success = true;
} catch (IOException e) {