changeset 29723:ff1961442c7f

Removed "must be big" requirement.
author Chris Kleeschulte <chrisk@bitpay.com>
date Fri, 20 Oct 2017 16:20:01 -0400
parents c09777e87e70
children
files src/validation.cpp test/functional/fork-large-block.py
diffstat 2 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/validation.cpp	Wed Oct 11 03:54:24 2017 -0400
+++ b/src/validation.cpp	Fri Oct 20 16:20:01 2017 -0400
@@ -3044,12 +3044,6 @@
     if (::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) > MaxBlockBaseSize(fSegwitSeasoned))
         return state.DoS(100, false, REJECT_INVALID, "bad-blk-length", false, "size limits failed");
 
-    // First block at fork must be large
-    if (fBIP102FirstBlock) {
-        if (::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) <= MAX_LEGACY_BLOCK_SIZE)
-            return state.DoS(100, false, REJECT_INVALID, "bad-blk-length-toosmall", false, "size limits failed");
-    }
-
     // No witness data is allowed in blocks that don't commit to witness data, as this would otherwise leave room for spam
     if (!fHaveWitness) {
       for (const auto& tx : block.vtx) {
--- a/test/functional/fork-large-block.py	Wed Oct 11 03:54:24 2017 -0400
+++ b/test/functional/fork-large-block.py	Fri Oct 20 16:20:01 2017 -0400
@@ -19,7 +19,7 @@
 bit 1 is optional for the following 48 blocks when BIP91 is LOCKED_IN (LOCKED_IN->ACTIVE)
 bit 1 is mandatory for the following 144 blocks until BIP141 is locked_in
 bit 1 is optional after BIP141 is locked_in
-mine 1007 blocks accept all blocks size next block required to be greater than 1 Mb
+mine 1007 blocks accept all blocks size next block is not required to be greater than 1 Mb
 '''
 
 class ForkLargeBlockTest(BitcoinTestFramework):
@@ -194,9 +194,7 @@
 
         assert_equal(self.height, 1583)
 
-        self.generate_blocks(1, 4, "bad-blk-length-toosmall") # block too small
-
-        self.generate_blocks(1, 4, txs=[large_tx[1], large_tx[2], large_tx[3]]) # mandatory large block
+        self.generate_blocks(1, 4, txs=[large_tx[1]]) # small block after fork is ok, "must be big" disabled
 
         assert_equal(self.height, 1584)