diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-02-16 17:23:06 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-02-16 17:47:48 +0100 |
commit | fa1fe80c757df0adcbfaf41b5c5c8a468bc07b6f (patch) | |
tree | be752824e1631cd43bb26f686934b98a211d6d94 /test/functional/rpc_blockchain.py | |
parent | fa4d8f3169e38cbdbae20258efebe7070c49f522 (diff) |
test: Change address type from P2PKH to P2WSH in rpc_blockchain
This change does not matter for the test, except that it increases
the bogosize due to the increase in the size of the scriptPubKey
Diffstat (limited to 'test/functional/rpc_blockchain.py')
-rwxr-xr-x | test/functional/rpc_blockchain.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 84ca1b99c2..cba464969e 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -23,6 +23,7 @@ import http.client import os import subprocess +from test_framework.address import ADDRESS_BCRT1_P2WSH_OP_TRUE from test_framework.blocktools import ( create_block, create_coinbase, @@ -71,11 +72,10 @@ class BlockchainTest(BitcoinTestFramework): def mine_chain(self): self.log.info('Create some old blocks') - address = self.nodes[0].get_deterministic_priv_key().address for t in range(TIME_GENESIS_BLOCK, TIME_GENESIS_BLOCK + 200 * 600, 600): # ten-minute steps from genesis block time self.nodes[0].setmocktime(t) - self.nodes[0].generatetoaddress(1, address) + self.nodes[0].generatetoaddress(1, ADDRESS_BCRT1_P2WSH_OP_TRUE) assert_equal(self.nodes[0].getblockchaininfo()['blocks'], 200) def _test_getblockchaininfo(self): @@ -227,7 +227,7 @@ class BlockchainTest(BitcoinTestFramework): assert_equal(res['transactions'], 200) assert_equal(res['height'], 200) assert_equal(res['txouts'], 200) - assert_equal(res['bogosize'], 15000), + assert_equal(res['bogosize'], 16800), assert_equal(res['bestblock'], node.getblockhash(200)) size = res['disk_size'] assert size > 6400 @@ -329,12 +329,12 @@ class BlockchainTest(BitcoinTestFramework): def _test_stopatheight(self): assert_equal(self.nodes[0].getblockcount(), 200) - self.nodes[0].generatetoaddress(6, self.nodes[0].get_deterministic_priv_key().address) + self.nodes[0].generatetoaddress(6, ADDRESS_BCRT1_P2WSH_OP_TRUE) assert_equal(self.nodes[0].getblockcount(), 206) self.log.debug('Node should not stop at this height') assert_raises(subprocess.TimeoutExpired, lambda: self.nodes[0].process.wait(timeout=3)) try: - self.nodes[0].generatetoaddress(1, self.nodes[0].get_deterministic_priv_key().address) + self.nodes[0].generatetoaddress(1, ADDRESS_BCRT1_P2WSH_OP_TRUE) except (ConnectionError, http.client.BadStatusLine): pass # The node already shut down before response self.log.debug('Node should stop at this height...') |