mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 06:47:54 +01:00
Verify MAX_BLOCK_SIZE in verifyTransactions().
This commit is contained in:
parent
7eae91ea47
commit
a1124e696b
1 changed files with 2 additions and 0 deletions
|
@ -722,6 +722,8 @@ public class Block extends Message {
|
||||||
if (transactions.isEmpty())
|
if (transactions.isEmpty())
|
||||||
throw new VerificationException("Block had no transactions");
|
throw new VerificationException("Block had no transactions");
|
||||||
maybeParseTransactions();
|
maybeParseTransactions();
|
||||||
|
if (this.getMessageSize() > MAX_BLOCK_SIZE)
|
||||||
|
throw new VerificationException("Block larger than MAX_BLOCK_SIZE");
|
||||||
checkTransactions();
|
checkTransactions();
|
||||||
checkMerkleRoot();
|
checkMerkleRoot();
|
||||||
checkSigOps();
|
checkSigOps();
|
||||||
|
|
Loading…
Add table
Reference in a new issue