From b9cf28d358e4d8281857e3c7f3f17e9871587513 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Wed, 21 Jan 2015 15:48:59 +0100 Subject: [PATCH] TransactionBroadcast: Better logging --- .../src/main/java/org/bitcoinj/core/TransactionBroadcast.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java b/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java index cfe92863..0b817751 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java @@ -83,7 +83,7 @@ public class TransactionBroadcast { public ListenableFuture broadcast() { peerGroup.addEventListener(rejectionListener, Threading.SAME_THREAD); - log.info("Waiting for {} peers required for broadcast ...", minConnections); + log.info("Waiting for {} peers required for broadcast, we have {} ...", minConnections, peerGroup.getConnectedPeers().size()); peerGroup.waitForPeers(minConnections).addListener(new EnoughAvailablePeers(), Threading.SAME_THREAD); return future; } @@ -121,7 +121,7 @@ public class TransactionBroadcast { numWaitingFor = (int) Math.ceil((peers.size() - numToBroadcastTo) / 2.0); Collections.shuffle(peers, random); peers = peers.subList(0, numToBroadcastTo); - log.info("broadcastTransaction: We have {} peers, adding {} to the memory pool and sending to {} peers, will wait for {}: {}", + log.info("broadcastTransaction: We have {} peers, adding {} to the memory pool and sending to {} peers, will wait for {}, sending to: {}", numConnected, tx.getHashAsString(), numToBroadcastTo, numWaitingFor, Joiner.on(",").join(peers)); for (Peer peer : peers) { try {