(self, node, miniwallet, txouts, fee, tx_batch_size)
| 30 | self.supports_cli = False |
| 31 | |
| 32 | def send_large_txs(self, node, miniwallet, txouts, fee, tx_batch_size): |
| 33 | for _ in range(tx_batch_size): |
| 34 | tx = miniwallet.create_self_transfer(from_node=node, fee_rate=0, mempool_valid=False)['tx'] |
| 35 | for txout in txouts: |
| 36 | tx.vout.append(txout) |
| 37 | # ELEMENTS: create_self_transfer makes a fee output at index 1 |
| 38 | amount = tx.vout[0].nValue.getAmount() - int(fee * COIN) |
| 39 | tx.vout[0].nValue.setToAmount(amount) |
| 40 | tx.vout[1].nValue.setToAmount(int(fee * COIN)) |
| 41 | res = node.testmempoolaccept([tx.serialize().hex()])[0] |
| 42 | assert_equal(res['fees']['base'], fee) |
| 43 | miniwallet.sendrawtransaction(from_node=node, tx_hex=tx.serialize().hex()) |
| 44 | |
| 45 | def run_test(self): |
| 46 | txouts = gen_return_txouts() |
no test coverage detected