diff options
author | John Newbery <john@johnnewbery.com> | 2018-10-16 11:21:07 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2018-11-01 12:53:49 -0400 |
commit | 3fd7e76f6d4b4eae0b36d9b33376274f5387a6f3 (patch) | |
tree | e01790c1fba7dba4f6a3954f3d86f8bb3dbf7ce7 /test/functional/test_framework/test_framework.py | |
parent | 08a57d51e90c232421681c9e6fe037ea4b3ed079 (diff) | |
download | bitcoin-3fd7e76f6d4b4eae0b36d9b33376274f5387a6f3.tar.xz |
[tests] Move deterministic address import to setup_nodes
This requires a small changes to a few tests, but means that
deterministic addresses will always be imported (unless setup_nodes
behaviour is explicitly overridden).
Diffstat (limited to 'test/functional/test_framework/test_framework.py')
-rwxr-xr-x | test/functional/test_framework/test_framework.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 7e2ec673df..44fc185e6d 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -168,7 +168,6 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): self.skip_test_if_missing_module() self.setup_chain() self.setup_network() - self.import_deterministic_coinbase_privkeys() self.run_test() success = TestStatus.PASSED except JSONRPCException as e: @@ -261,11 +260,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): extra_args = self.extra_args self.add_nodes(self.num_nodes, extra_args) self.start_nodes() + self.import_deterministic_coinbase_privkeys() def import_deterministic_coinbase_privkeys(self): - if self.setup_clean_chain: - return - for n in self.nodes: try: n.getwalletinfo() @@ -273,7 +270,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): assert str(e).startswith('Method not found') continue - n.importprivkey(n.get_deterministic_priv_key().key) + n.importprivkey(privkey=n.get_deterministic_priv_key().key, label='coinbase') def run_test(self): """Tests must override this method to define test logic""" |