def mine_large_blocks(node, n):
    if ('nTimes' not in mine_large_blocks.__dict__):
        mine_large_blocks.nTime = 0
    big_script = CScript(([OP_RETURN] + ([OP_NOP] * 950000)))
    best_block = node.getblock(node.getbestblockhash())
    height = (int(best_block['height']) + 1)
    mine_large_blocks.nTime = (max(mine_large_blocks.nTime, int(best_block['time'])) + 1)
    previousblockhash = int(best_block['hash'], 16)
    for _ in range(n):
        coinbase_tx = create_coinbase(height)
        coinbase_tx.vin[0].nSequence = ((2 ** 32) - 1)
        coinbase_tx.vout[0].scriptPubKey = big_script
        coinbase_tx.rehash()
        block = CBlock()
        block.nVersion = best_block['version']
        block.hashPrevBlock = previousblockhash
        block.nTime = mine_large_blocks.nTime
        block.nBits = int('207fffff', 16)
        block.nNonce = 0
        block.vtx = [coinbase_tx]
        block.hashMerkleRoot = block.calc_merkle_root()
        block.solve()
        node.submitblock(block.serialize().hex())
        previousblockhash = block.sha256
        height += 1
        mine_large_blocks.nTime += 1
def mine_large_blocks(node, n):
    if ('nTimes' not in mine_large_blocks.__dict__):
        mine_large_blocks.nTime = 0
    big_script = CScript(([OP_RETURN] + ([OP_NOP] * 950000)))
    best_block = node.getblock(node.getbestblockhash())
    height = (int(best_block['height']) + 1)
    mine_large_blocks.nTime = (max(mine_large_blocks.nTime, int(best_block['time'])) + 1)
    previousblockhash = int(best_block['hash'], 16)
    for _ in range(n):
        coinbase_tx = create_coinbase(height)
        coinbase_tx.vin[0].nSequence = ((2 ** 32) - 1)
        coinbase_tx.vout[0].scriptPubKey = big_script
        coinbase_tx.rehash()
        block = CBlock()
        block.nVersion = best_block['version']
        block.hashPrevBlock = previousblockhash
        block.nTime = mine_large_blocks.nTime
        block.nBits = int('207fffff', 16)
        block.nNonce = 0
        block.vtx = [coinbase_tx]
        block.hashMerkleRoot = block.calc_merkle_root()
        block.solve()
        node.submitblock(block.serialize().hex())
        previousblockhash = block.sha256
        height += 1
        mine_large_blocks.nTime += 1