aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/test_node.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-10-16 11:21:07 -0400
committerJohn Newbery <john@johnnewbery.com>2018-11-01 12:53:49 -0400
commit3fd7e76f6d4b4eae0b36d9b33376274f5387a6f3 (patch)
treee01790c1fba7dba4f6a3954f3d86f8bb3dbf7ce7 /test/functional/test_framework/test_node.py
parent08a57d51e90c232421681c9e6fe037ea4b3ed079 (diff)
downloadbitcoin-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_node.py')
-rwxr-xr-xtest/functional/test_framework/test_node.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index cc1bfabbfa..3a6107bb37 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -199,21 +199,6 @@ class TestNode():
def generate(self, nblocks, maxtries=1000000):
self.log.debug("TestNode.generate() dispatches `generate` call to `generatetoaddress`")
- # Try to import the node's deterministic private key. This is a no-op if the private key
- # has already been imported.
- try:
- self.rpc.importprivkey(privkey=self.get_deterministic_priv_key().key, label='coinbase', rescan=False)
- except JSONRPCException as e:
- # This may fail if:
- # - wallet is disabled ('Method not found')
- # - there are multiple wallets to import to ('Wallet file not specified')
- # - wallet is locked ('Error: Please enter the wallet passphrase with walletpassphrase first')
- # Just ignore those errors. We can make this tidier by importing the privkey during TestFramework.setup_nodes
- # TODO: tidy up deterministic privkey import.
- assert str(e).startswith('Method not found') or \
- str(e).startswith('Wallet file not specified') or \
- str(e).startswith('Error: Please enter the wallet passphrase with walletpassphrase first')
-
return self.generatetoaddress(nblocks=nblocks, address=self.get_deterministic_priv_key().address, maxtries=maxtries)
def get_wallet_rpc(self, wallet_name):