def build_block_with_transactions(self, node, utxo, num_transactions):
    block = self.build_block_on_tip(node)
    for i in range(num_transactions):
        tx = CTransaction()
        tx.vin.append(CTxIn(COutPoint(utxo[0], utxo[1]), b''))
        tx.vout.append(CTxOut((utxo[2] - 1000), CScript([OP_TRUE])))
        tx.rehash()
        utxo = [tx.sha256, 0, tx.vout[0].nValue]
        block.vtx.append(tx)
    block.hashMerkleRoot = block.calc_merkle_root()
    block.solve()
    return block
def build_block_with_transactions(self, node, utxo, num_transactions):
    block = self.build_block_on_tip(node)
    for i in range(num_transactions):
        tx = CTransaction()
        tx.vin.append(CTxIn(COutPoint(utxo[0], utxo[1]), b))
        tx.vout.append(CTxOut((utxo[2] - 1000), CScript([OP_TRUE])))
        tx.rehash()
        utxo = [tx.sha256, 0, tx.vout[0].nValue]
        block.vtx.append(tx)
    block.hashMerkleRoot = block.calc_merkle_root()
    block.solve()
    return block