From 6efa8a4fac9a2b0da83e0737d1c35a304ad93e81 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Sat, 10 Jan 2015 00:51:48 +0100 Subject: [PATCH] PeerGroup: Don't rethrow a runtime exception and kill the peer if a broadcast takes an exception, this can occur if there is a reject message. --- core/src/main/java/org/bitcoinj/core/PeerGroup.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/core/PeerGroup.java b/core/src/main/java/org/bitcoinj/core/PeerGroup.java index 8ed76a43..1c911cd8 100644 --- a/core/src/main/java/org/bitcoinj/core/PeerGroup.java +++ b/core/src/main/java/org/bitcoinj/core/PeerGroup.java @@ -1657,9 +1657,8 @@ public class PeerGroup implements TransactionBroadcaster { @Override public void onFailure(Throwable throwable) { - // This can't happen with the current code, but just in case one day that changes ... + // This can happen if we get a reject message from a peer. runningBroadcasts.remove(broadcast); - throw new RuntimeException(throwable); } }); // Keep a reference to the TransactionBroadcast object. This is important because otherwise, the entire tree