mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
Changed functional tests which do not require wallets to run without
skipping .Addreses #14216. Changed get_deterministic_priv_key() to a named tuple
This commit is contained in:
@@ -48,9 +48,6 @@ class BlockchainTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 1
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
def run_test(self):
|
||||
self.restart_node(0, extra_args=['-stopatheight=207', '-prune=1']) # Set extra args with pruning after rescan is complete
|
||||
|
||||
@@ -242,12 +239,12 @@ class BlockchainTest(BitcoinTestFramework):
|
||||
|
||||
def _test_stopatheight(self):
|
||||
assert_equal(self.nodes[0].getblockcount(), 200)
|
||||
self.nodes[0].generate(6)
|
||||
self.nodes[0].generatetoaddress(6, self.nodes[0].get_deterministic_priv_key().address)
|
||||
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].generate(1)
|
||||
self.nodes[0].generatetoaddress(1, self.nodes[0].get_deterministic_priv_key().address)
|
||||
except (ConnectionError, http.client.BadStatusLine):
|
||||
pass # The node already shut down before response
|
||||
self.log.debug('Node should stop at this height...')
|
||||
|
Reference in New Issue
Block a user