def METHOD_NAME(self):
    self.coinbase_blocks = self.nodes[0].generate(2)
    height = 3  # height of the next block to build
    self.tip = int("0x" + self.nodes[0].getbestblockhash(), 0)
    self.nodeaddress = self.nodes[0].getnewaddress()
    self.last_block_time = int(time.time())
    ''' 398 more version 3 blocks '''
    test_blocks = []
    for i in range(398):
        block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
        block.nVersion = 3
        block.rehash()
        block.solve()
        test_blocks.append([block, True])
        self.last_block_time += 1
        self.tip = block.sha256
        height += 1
    yield TestInstance(test_blocks, sync_every_block=False)
    ''' Mine 749 version 4 blocks '''
    test_blocks = []
    for i in range(749):
        block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
        block.nVersion = 4
        block.rehash()
        block.solve()
        test_blocks.append([block, True])
        self.last_block_time += 1
        self.tip = block.sha256
        height += 1
    yield TestInstance(test_blocks, sync_every_block=False)
    '''
    Check that the new CLTV rules are not enforced in the 750th
    version 3 block.
    '''
    spendtx = self.create_transaction(self.nodes[0],
            self.coinbase_blocks[0], self.nodeaddress, 1.0)
    cltv_invalidate(spendtx)
    spendtx.rehash()
    block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
    block.nVersion = 4
    block.vtx.append(spendtx)
    block.hashMerkleRoot = block.calc_merkle_root()
    block.rehash()
    block.solve()
    self.last_block_time += 1
    self.tip = block.sha256
    height += 1
    yield TestInstance([[block, True]])
    ''' Mine 199 new version blocks on last valid tip '''
    test_blocks = []
    for i in range(199):
        block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
        block.nVersion = 4
        block.rehash()
        block.solve()
        test_blocks.append([block, True])
        self.last_block_time += 1
        self.tip = block.sha256
        height += 1
    yield TestInstance(test_blocks, sync_every_block=False)
    ''' Mine 1 old version block '''
    block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
    block.nVersion = 3
    block.rehash()
    block.solve()
    self.last_block_time += 1
    self.tip = block.sha256
    height += 1
    yield TestInstance([[block, True]])
    ''' Mine 1 new version block '''
    block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
    block.nVersion = 4
    block.rehash()
    block.solve()
    self.last_block_time += 1
    self.tip = block.sha256
    height += 1
    yield TestInstance([[block, True]])
    '''
    Check that the new CLTV rules are enforced in the 951st version 4
    block.
    '''
    spendtx = self.create_transaction(self.nodes[0],
            self.coinbase_blocks[1], self.nodeaddress, 1.0)
    cltv_invalidate(spendtx)
    spendtx.rehash()
    block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
    block.nVersion = 4
    block.vtx.append(spendtx)
    block.hashMerkleRoot = block.calc_merkle_root()
    block.rehash()
    block.solve()
    self.last_block_time += 1
    yield TestInstance([[block, False]])
    ''' Mine 1 old version block, should be invalid '''
    block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
    block.nVersion = 3
    block.rehash()
    block.solve()
    self.last_block_time += 1
    yield TestInstance([[block, False]])