3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-30 23:02:15 +00:00

Verify MAX_BLOCK_SIZE in verifyTransactions().

This commit is contained in:
Matt Corallo 2012-07-11 02:02:39 +02:00 committed by Mike Hearn
parent 7eae91ea47
commit a1124e696b

View File

@ -722,6 +722,8 @@ public class Block extends Message {
if (transactions.isEmpty())
throw new VerificationException("Block had no transactions");
maybeParseTransactions();
if (this.getMessageSize() > MAX_BLOCK_SIZE)
throw new VerificationException("Block larger than MAX_BLOCK_SIZE");
checkTransactions();
checkMerkleRoot();
checkSigOps();