aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-07-14 17:37:54 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-07-14 17:49:48 -0700
commitf90603ac6d24f5263649675d51233f1fce8b2ecd (patch)
treee2e2b4f29859a255db00b479d2dae30b70139d0c /src/validation.cpp
parentb7d6623c76e1468f2a93db5a3120580e2784d74a (diff)
parent3babbcb48786372d4b22171674c4cc5a6220c294 (diff)
Merge #10618: Remove confusing MAX_BLOCK_BASE_SIZE.
3babbcb48 Remove confusing MAX_BLOCK_BASE_SIZE. (Gregory Maxwell) Tree-SHA512: 361293fc4e1e379cd5a0908ed0866a00e1c7a771bdf02fded158fca21b492a29c7a67fea0d13dc40b2a04204c89823bf1836fe5b63a17c9747751b9c845a3527
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index bcc158c504..d7d880d24f 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2799,7 +2799,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P
// checks that use witness data may be performed here.
// Size limits
- if (block.vtx.empty() || block.vtx.size() > MAX_BLOCK_BASE_SIZE || ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) > MAX_BLOCK_BASE_SIZE)
+ if (block.vtx.empty() || block.vtx.size() * WITNESS_SCALE_FACTOR > MAX_BLOCK_WEIGHT || ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * WITNESS_SCALE_FACTOR > MAX_BLOCK_WEIGHT)
return state.DoS(100, false, REJECT_INVALID, "bad-blk-length", false, "size limits failed");
// First transaction must be coinbase, the rest must not be