mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
test: rpc_createmultisig, remove manual wallet initialization
There is no need to manually initialize the wallets within the test case. The test framework already initializes them when `_requires_wallet` is true.
This commit is contained in:
parent
f5b6f621ff
commit
3635d43268
@ -32,6 +32,7 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 3
|
||||
self.supports_cli = False
|
||||
self.enable_wallet_if_possible()
|
||||
|
||||
def get_keys(self):
|
||||
self.pub = []
|
||||
@ -51,7 +52,6 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
|
||||
self.wallet = MiniWallet(test_node=node0)
|
||||
|
||||
if self.is_bdb_compiled():
|
||||
self.import_deterministic_coinbase_privkeys()
|
||||
self.check_addmultisigaddress_errors()
|
||||
|
||||
self.log.info('Generating blocks ...')
|
||||
|
@ -444,6 +444,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
n.createwallet(wallet_name=wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
|
||||
n.importprivkey(privkey=n.get_deterministic_priv_key().key, label='coinbase', rescan=True)
|
||||
|
||||
# Only enables wallet support when the module is available
|
||||
def enable_wallet_if_possible(self):
|
||||
self._requires_wallet = self.is_wallet_compiled()
|
||||
|
||||
def run_test(self):
|
||||
"""Tests must override this method to define test logic"""
|
||||
raise NotImplementedError
|
||||
|
Loading…
Reference in New Issue
Block a user