|
23 | 23 | import os
|
24 | 24 | import subprocess
|
25 | 25 |
|
| 26 | +from test_framework.address import ADDRESS_BCRT1_P2WSH_OP_TRUE |
26 | 27 | from test_framework.blocktools import (
|
27 | 28 | create_block,
|
28 | 29 | create_coinbase,
|
@@ -71,11 +72,10 @@ def run_test(self):
|
71 | 72 |
|
72 | 73 | def mine_chain(self):
|
73 | 74 | self.log.info('Create some old blocks')
|
74 |
| - address = self.nodes[0].get_deterministic_priv_key().address |
75 | 75 | for t in range(TIME_GENESIS_BLOCK, TIME_GENESIS_BLOCK + 200 * 600, 600):
|
76 | 76 | # ten-minute steps from genesis block time
|
77 | 77 | self.nodes[0].setmocktime(t)
|
78 |
| - self.nodes[0].generatetoaddress(1, address) |
| 78 | + self.nodes[0].generatetoaddress(1, ADDRESS_BCRT1_P2WSH_OP_TRUE) |
79 | 79 | assert_equal(self.nodes[0].getblockchaininfo()['blocks'], 200)
|
80 | 80 |
|
81 | 81 | def _test_getblockchaininfo(self):
|
@@ -227,7 +227,7 @@ def _test_gettxoutsetinfo(self):
|
227 | 227 | assert_equal(res['transactions'], 200)
|
228 | 228 | assert_equal(res['height'], 200)
|
229 | 229 | assert_equal(res['txouts'], 200)
|
230 |
| - assert_equal(res['bogosize'], 15000), |
| 230 | + assert_equal(res['bogosize'], 16800), |
231 | 231 | assert_equal(res['bestblock'], node.getblockhash(200))
|
232 | 232 | size = res['disk_size']
|
233 | 233 | assert size > 6400
|
@@ -329,12 +329,12 @@ def _test_getnetworkhashps(self):
|
329 | 329 |
|
330 | 330 | def _test_stopatheight(self):
|
331 | 331 | assert_equal(self.nodes[0].getblockcount(), 200)
|
332 |
| - self.nodes[0].generatetoaddress(6, self.nodes[0].get_deterministic_priv_key().address) |
| 332 | + self.nodes[0].generatetoaddress(6, ADDRESS_BCRT1_P2WSH_OP_TRUE) |
333 | 333 | assert_equal(self.nodes[0].getblockcount(), 206)
|
334 | 334 | self.log.debug('Node should not stop at this height')
|
335 | 335 | assert_raises(subprocess.TimeoutExpired, lambda: self.nodes[0].process.wait(timeout=3))
|
336 | 336 | try:
|
337 |
| - self.nodes[0].generatetoaddress(1, self.nodes[0].get_deterministic_priv_key().address) |
| 337 | + self.nodes[0].generatetoaddress(1, ADDRESS_BCRT1_P2WSH_OP_TRUE) |
338 | 338 | except (ConnectionError, http.client.BadStatusLine):
|
339 | 339 | pass # The node already shut down before response
|
340 | 340 | self.log.debug('Node should stop at this height...')
|
|
0 commit comments