Skip to content

Commit fa1fe80

Browse files
author
MarcoFalke
committed
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
1 parent fa4d8f3 commit fa1fe80

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/functional/rpc_blockchain.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import os
2424
import subprocess
2525

26+
from test_framework.address import ADDRESS_BCRT1_P2WSH_OP_TRUE
2627
from test_framework.blocktools import (
2728
create_block,
2829
create_coinbase,
@@ -71,11 +72,10 @@ def run_test(self):
7172

7273
def mine_chain(self):
7374
self.log.info('Create some old blocks')
74-
address = self.nodes[0].get_deterministic_priv_key().address
7575
for t in range(TIME_GENESIS_BLOCK, TIME_GENESIS_BLOCK + 200 * 600, 600):
7676
# ten-minute steps from genesis block time
7777
self.nodes[0].setmocktime(t)
78-
self.nodes[0].generatetoaddress(1, address)
78+
self.nodes[0].generatetoaddress(1, ADDRESS_BCRT1_P2WSH_OP_TRUE)
7979
assert_equal(self.nodes[0].getblockchaininfo()['blocks'], 200)
8080

8181
def _test_getblockchaininfo(self):
@@ -227,7 +227,7 @@ def _test_gettxoutsetinfo(self):
227227
assert_equal(res['transactions'], 200)
228228
assert_equal(res['height'], 200)
229229
assert_equal(res['txouts'], 200)
230-
assert_equal(res['bogosize'], 15000),
230+
assert_equal(res['bogosize'], 16800),
231231
assert_equal(res['bestblock'], node.getblockhash(200))
232232
size = res['disk_size']
233233
assert size > 6400
@@ -329,12 +329,12 @@ def _test_getnetworkhashps(self):
329329

330330
def _test_stopatheight(self):
331331
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)
333333
assert_equal(self.nodes[0].getblockcount(), 206)
334334
self.log.debug('Node should not stop at this height')
335335
assert_raises(subprocess.TimeoutExpired, lambda: self.nodes[0].process.wait(timeout=3))
336336
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)
338338
except (ConnectionError, http.client.BadStatusLine):
339339
pass # The node already shut down before response
340340
self.log.debug('Node should stop at this height...')

0 commit comments

Comments
 (0)