test: Replace importprivkey with wallet_importprivkey
importprivkey was a legacy wallet only RPC which had a helper for descriptor wallets in tests. Add wallet_importprivkey helper and use it wherever importprivkey is used (other than backward compatibility tests)
This commit is contained in:
1 parent
94c87bbbd0
commit
fcc457573f
10 files changed
+33
-26
No files matched your search
@@ -12,6 +12,7 @@ from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_equal,
|
||||
assert_raises_rpc_error,
|
||||
wallet_importprivkey,
|
||||
)
|
||||
import json
|
||||
import os
|
||||
@@ -45,7 +46,7 @@ class GetblockstatsTest(BitcoinTestFramework):
|
||||
self.nodes[0].setmocktime(mocktime)
|
||||
self.nodes[0].createwallet(wallet_name='test')
|
||||
privkey = self.nodes[0].get_deterministic_priv_key().key
|
||||
self.nodes[0].importprivkey(privkey)
|
||||
wallet_importprivkey(self.nodes[0], privkey, 0)
|
||||
|
||||
self.generate(self.nodes[0], COINBASE_MATURITY + 1)
|
||||
|
||||
|
||||
Reference in new issue
Block a user