diff options
Diffstat (limited to 'test/functional/mempool_spend_coinbase.py')
-rwxr-xr-x | test/functional/mempool_spend_coinbase.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/mempool_spend_coinbase.py b/test/functional/mempool_spend_coinbase.py index db0738c08a..ce3bc3b7e0 100755 --- a/test/functional/mempool_spend_coinbase.py +++ b/test/functional/mempool_spend_coinbase.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2014-2017 The Bitcoin Core developers +# Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test spending coinbase transactions. @@ -13,13 +13,13 @@ but less mature coinbase spends are NOT. """ from test_framework.test_framework import BitcoinTestFramework -from test_framework.util import * +from test_framework.blocktools import create_raw_transaction +from test_framework.util import assert_equal, assert_raises_rpc_error + -# Create one-input, one-output, no-fee transaction: class MempoolSpendCoinbaseTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 1 - self.extra_args = [["-checkmempool"]] def run_test(self): chain_height = self.nodes[0].getblockcount() @@ -29,9 +29,9 @@ class MempoolSpendCoinbaseTest(BitcoinTestFramework): # Coinbase at height chain_height-100+1 ok in mempool, should # get mined. Coinbase at height chain_height-100+2 is # 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 = [ create_tx(self.nodes[0], txid, node0_address, 49.99) for txid in coinbase_txids ] + 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 = [create_raw_transaction(self.nodes[0], txid, node0_address, amount=49.99) for txid in coinbase_txids] spend_101_id = self.nodes[0].sendrawtransaction(spends_raw[0]) |