diff --git a/core/src/main/java/org/bitcoinj/core/Message.java b/core/src/main/java/org/bitcoinj/core/Message.java index 7e156c210a5..9db2d76b4ae 100644 --- a/core/src/main/java/org/bitcoinj/core/Message.java +++ b/core/src/main/java/org/bitcoinj/core/Message.java @@ -93,7 +93,7 @@ protected Message(NetworkParameters params, byte[] payload, int offset, int prot parse(); - if (this.length == UNKNOWN_LENGTH) + if (this.length == UNKNOWN_LENGTH && !(this instanceof UnknownMessage)) checkState(false, "Length field has not been set in constructor for %s after parse.", getClass().getSimpleName());