def METHOD_NAME(self, node, txs, witness = False, accept = False):
    block = create_block(self.tip, create_coinbase(self.lastblockheight + 1), self.lastblocktime + 1)
    block.nVersion = 4
    for tx in txs:
        tx.rehash()
        block.vtx.append(tx)
    block.hashMerkleRoot = block.calc_merkle_root()
    witness and add_witness_commitment(block)
    block.rehash()
    block.solve()
    node.submitblock(bytes_to_hex_str(block.serialize(True)))
    if (accept):
        assert_equal(node.getbestblockhash(), block.hash)
        self.tip = block.sha256
        self.lastblockhash = block.hash
        self.lastblocktime += 1
        self.lastblockheight += 1
    else:
        assert_equal(node.getbestblockhash(), self.lastblockhash)