mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-15 16:38:23 +01:00
Merge bitcoin/bitcoin#32452: test: Remove legacy wallet RPC overloads
b104d44227test: Remove RPCOverloadWrapper (Ava Chow)4d32c19516test: Replace importpubkey (Ava Chow)fe838dd391test: Replace usage of addmultisigaddress (Ava Chow)d314207779test: Replace usage of importaddress (Ava Chow)fcc457573ftest: Replace importprivkey with wallet_importprivkey (Ava Chow)94c87bbbd0test: Remove unnecessary importprivkey from wallet_createwallet (Ava Chow) Pull request description: `RPCOverloadWrapper` implemented overloads for legacy wallet only RPCs so that the same function call could be used within tests for both legacy wallets and descriptor wallets. With legacy wallets now removed, there is no need to continue to have these overloads. For `importaddress`, `addmultisigaddress`, and `importpubkey`, the uses of these are converted to `importdescriptors`. For `importprivkey`, a new helper function `wallet_imporprivkey` is introduced that does what the overload did. This is mainly to reduce verbosity as `importprivkey` was more widely used throughout the tests. Some tests that used these RPCs are now also no longer relevant and have been removed. ACKs for top commit: Sjors: ACKb104d44227pablomartin4btc: cr ACKb104d44227rkrux: ACKb104d44227w0xlt: ACKb104d44227Tree-SHA512: ded2f73829e2ce28466d4a9738eb382783ad990daee5d1859dbc4d354e6f8eec0c483ed5ecb1287fe0dd24ac332065b733a30d71b126b841bd7cd49e9a094b6d
This commit is contained in:
@@ -35,6 +35,7 @@ from .util import (
|
||||
initialize_datadir,
|
||||
p2p_port,
|
||||
wait_until_helper_internal,
|
||||
wallet_importprivkey,
|
||||
)
|
||||
|
||||
|
||||
@@ -485,7 +486,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
n = self.nodes[node]
|
||||
if wallet_name is not None:
|
||||
n.createwallet(wallet_name=wallet_name, load_on_startup=True)
|
||||
n.importprivkey(privkey=n.get_deterministic_priv_key().key, label='coinbase', rescan=True)
|
||||
wallet_importprivkey(n.get_wallet_rpc(wallet_name), n.get_deterministic_priv_key().key, 0, label="coinbase")
|
||||
|
||||
def run_test(self):
|
||||
"""Tests must override this method to define test logic"""
|
||||
|
||||
Reference in New Issue
Block a user