mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
Merge bitcoin/bitcoin#32977: wallet: Remove wallet version and several legacy related functions
60d1042b9awallet: Remove unused `WalletFeature` enums (woltx)66de58208awallet: Remove `CWallet::nWalletVersion` and related functions (woltx)7cda3d0f5bwallet: Remove `IsFeatureSupported()` and `CanSupportFeature()` (woltx)ba01585229wallet: `MigrateToDescriptor` no longer calls `CanSupportFeature` (woltx)63acee2797wallet: Remove `GetClosestWalletFeature()` (woltx)e27da3150bwallet: 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: ACK60d1042b9apablomartin4btc: ACK60d1042b9aTree-SHA512: 1a7ad8e15d57df8f66545776e7d178a2cd5312c87769a29770588375e3de5f24247aab9919acf004ed3eca16d08ba595b5f1c7b2b3eef7752e89d9c295624583
This commit is contained in:
@@ -624,10 +624,13 @@ std::optional<MigrationData> LegacyDataSPKM::MigrateToDescriptor()
|
||||
for (const auto& chain_pair : m_inactive_hd_chains) {
|
||||
chains.push_back(chain_pair.second);
|
||||
}
|
||||
|
||||
bool can_support_hd_split_feature = m_hd_chain.nVersion >= CHDChain::VERSION_HD_CHAIN_SPLIT;
|
||||
|
||||
for (const CHDChain& chain : chains) {
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
// Skip if doing internal chain and split chain is not supported
|
||||
if (chain.seed_id.IsNull() || (i == 1 && !m_storage.CanSupportFeature(FEATURE_HD_SPLIT))) {
|
||||
if (chain.seed_id.IsNull() || (i == 1 && !can_support_hd_split_feature)) {
|
||||
continue;
|
||||
}
|
||||
// Get the master xprv
|
||||
|
||||
Reference in New Issue
Block a user