diff options
author | MarcoFalke <falke.marco@gmail.com> | 2016-01-04 13:54:23 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-03-14 16:45:04 +0100 |
commit | fa8cd46f39778925eaf2caf812cccd9fb8503368 (patch) | |
tree | 68084803ac7bc2da9317b68b0aba11556315d5a1 /qa/rpc-tests/mempool_spendcoinbase.py | |
parent | fad7dc8a6c0ca9c067a249cf8896dd2e64703e48 (diff) |
[qa] Move create_tx() to util.py
Diffstat (limited to 'qa/rpc-tests/mempool_spendcoinbase.py')
-rwxr-xr-x | qa/rpc-tests/mempool_spendcoinbase.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/qa/rpc-tests/mempool_spendcoinbase.py b/qa/rpc-tests/mempool_spendcoinbase.py index 16f512db38..507b5ff416 100755 --- a/qa/rpc-tests/mempool_spendcoinbase.py +++ b/qa/rpc-tests/mempool_spendcoinbase.py @@ -26,14 +26,6 @@ class MempoolSpendCoinbaseTest(BitcoinTestFramework): self.nodes.append(start_node(0, self.options.tmpdir, args)) self.is_network_split = False - def create_tx(self, from_txid, to_address, amount): - inputs = [{ "txid" : from_txid, "vout" : 0}] - outputs = { to_address : amount } - rawtx = self.nodes[0].createrawtransaction(inputs, outputs) - signresult = self.nodes[0].signrawtransaction(rawtx) - assert_equal(signresult["complete"], True) - return signresult["hex"] - def run_test(self): chain_height = self.nodes[0].getblockcount() assert_equal(chain_height, 200) @@ -44,7 +36,7 @@ class MempoolSpendCoinbaseTest(BitcoinTestFramework): # is too immature to spend. b = [ self.nodes[0].getblockhash(n) for n in range(101, 103) ] coinbase_txids = [ self.nodes[0].getblock(h)['tx'][0] for h in b ] - spends_raw = [ self.create_tx(txid, node0_address, 49.99) for txid in coinbase_txids ] + spends_raw = [ create_tx(self.nodes[0], txid, node0_address, 49.99) for txid in coinbase_txids ] spend_101_id = self.nodes[0].sendrawtransaction(spends_raw[0]) |