diff --git a/core/src/main/java/org/bitcoinj/utils/BlockFileLoader.java b/core/src/main/java/org/bitcoinj/utils/BlockFileLoader.java index ae728e9842c..001da41e478 100644 --- a/core/src/main/java/org/bitcoinj/utils/BlockFileLoader.java +++ b/core/src/main/java/org/bitcoinj/utils/BlockFileLoader.java @@ -164,9 +164,6 @@ private void loadNextBlock() { byte[] bytes = new byte[4]; currentFileStream.read(bytes, 0, 4); long size = Utils.readUint32BE(Utils.reverseBytes(bytes), 0); - // We allow larger than MAX_BLOCK_SIZE because test code uses this as well. - if (size > Block.MAX_BLOCK_SIZE*2 || size <= 0) - continue; bytes = new byte[(int) size]; currentFileStream.read(bytes, 0, (int) size); try {