mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-25 20:41:21 +02:00
Merge bitcoin/bitcoin#32977: wallet: Remove wallet version and several legacy related functions
60d1042b9a
wallet: Remove unused `WalletFeature` enums (woltx)66de58208a
wallet: Remove `CWallet::nWalletVersion` and related functions (woltx)7cda3d0f5b
wallet: Remove `IsFeatureSupported()` and `CanSupportFeature()` (woltx)ba01585229
wallet: `MigrateToDescriptor` no longer calls `CanSupportFeature` (woltx)63acee2797
wallet: Remove `GetClosestWalletFeature()` (woltx)e27da3150b
wallet: Remove `GetVersion()` (woltx) Pull request description: This PR incorporates the suggestion provided by PRabahy and pablomartin4btc in https://github.com/bitcoin/bitcoin/pull/32944 of removing `CWallet::nWalletVersion` and several related functions, such as `SetMinVersion()`, `GetVersion()`, `GetClosestWalletFeature()`, `IsFeatureSupported()`, `CanSupportFeature()`, etc ... This field is no longer used in the descriptor wallet and there is still a lot of code related to it, so the changes here provide a good cleanup in the wallet code. Built on top of https://github.com/bitcoin/bitcoin/pull/32944 ACKs for top commit: maflcko: review ACK60d1042b9a
🐾 achow101: ACK60d1042b9a
pablomartin4btc: ACK60d1042b9a
Tree-SHA512: 1a7ad8e15d57df8f66545776e7d178a2cd5312c87769a29770588375e3de5f24247aab9919acf004ed3eca16d08ba595b5f1c7b2b3eef7752e89d9c295624583
This commit is contained in:
@@ -167,15 +167,13 @@ class CreateWalletTest(BitcoinTestFramework):
|
||||
assert_raises_rpc_error(-4, 'descriptors argument must be set to "true"; it is no longer possible to create a legacy wallet.', self.nodes[0].createwallet, wallet_name="legacy", descriptors=False)
|
||||
|
||||
self.log.info("Check that the version number is being logged correctly")
|
||||
with node.assert_debug_log(expected_msgs=[], unexpected_msgs=["Last client version = ", "Wallet file version = "]):
|
||||
with node.assert_debug_log(expected_msgs=[], unexpected_msgs=["Last client version = "]):
|
||||
node.createwallet("version_check")
|
||||
wallet = node.get_wallet_rpc("version_check")
|
||||
wallet_version = wallet.getwalletinfo()["walletversion"]
|
||||
client_version = node.getnetworkinfo()["version"]
|
||||
wallet.unloadwallet()
|
||||
with node.assert_debug_log(
|
||||
expected_msgs=[f"Last client version = {client_version}", f"Wallet file version = {wallet_version}"],
|
||||
unexpected_msgs=["Wallet file version = 10500"]
|
||||
expected_msgs=[f"Last client version = {client_version}"]
|
||||
):
|
||||
node.loadwallet("version_check")
|
||||
|
||||
|
Reference in New Issue
Block a user