From a67909bebf043d22f7351784f6cd4650334a7e7f Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Fri, 16 Dec 2011 14:24:03 +0100 Subject: [PATCH] Don't throw an exception when parsing an unknown message type. --- src/com/google/bitcoin/core/BitcoinSerializer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/google/bitcoin/core/BitcoinSerializer.java b/src/com/google/bitcoin/core/BitcoinSerializer.java index 627881a8..960b7fe6 100644 --- a/src/com/google/bitcoin/core/BitcoinSerializer.java +++ b/src/com/google/bitcoin/core/BitcoinSerializer.java @@ -335,7 +335,8 @@ public class BitcoinSerializer { } else if (command.equals("headers")) { return new HeadersMessage(params, payloadBytes); } else { - throw new ProtocolException("No support for deserializing message with name " + command); + log.warn("No support for deserializing message with name {}", command); + return new UnknownMessage(params, command, payloadBytes); } if (checksum != null) message.setChecksum(checksum);