mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 17:26:28 +01:00
BlockFileLoader: Remove inexact block size check.
Bitcoin Core doesn't allow over- or undersized blocks in its dat files.
This commit is contained in:
parent
e407240b7e
commit
a61080ebeb
1 changed files with 0 additions and 3 deletions
|
@ -157,9 +157,6 @@ public class BlockFileLoader implements Iterable<Block>, Iterator<Block> {
|
|||
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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue