From 63acee279756e72f96fda14a9963281860bf318b Mon Sep 17 00:00:00 2001 From: woltx <94266259+w0xlt@users.noreply.github.com> Date: Mon, 14 Jul 2025 23:12:31 -0700 Subject: [PATCH] wallet: Remove `GetClosestWalletFeature()` --- src/wallet/walletutil.cpp | 9 --------- src/wallet/walletutil.h | 1 - 2 files changed, 10 deletions(-) diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp index 53e65d0194a..9b296aebed9 100644 --- a/src/wallet/walletutil.cpp +++ b/src/wallet/walletutil.cpp @@ -37,15 +37,6 @@ bool IsFeatureSupported(int wallet_version, int feature_version) return wallet_version >= feature_version; } -WalletFeature GetClosestWalletFeature(int version) -{ - static constexpr std::array wallet_features{FEATURE_LATEST, FEATURE_PRE_SPLIT_KEYPOOL, FEATURE_NO_DEFAULT_KEY, FEATURE_HD_SPLIT, FEATURE_HD, FEATURE_COMPRPUBKEY, FEATURE_WALLETCRYPT, FEATURE_BASE}; - for (const WalletFeature& wf : wallet_features) { - if (version >= wf) return wf; - } - return static_cast(0); -} - WalletDescriptor GenerateWalletDescriptor(const CExtPubKey& master_key, const OutputType& addr_type, bool internal) { int64_t creation_time = GetTime(); diff --git a/src/wallet/walletutil.h b/src/wallet/walletutil.h index ef9d93eb07c..ca0786c1f37 100644 --- a/src/wallet/walletutil.h +++ b/src/wallet/walletutil.h @@ -31,7 +31,6 @@ enum WalletFeature }; bool IsFeatureSupported(int wallet_version, int feature_version); -WalletFeature GetClosestWalletFeature(int version); enum WalletFlags : uint64_t { // wallet flags in the upper section (> 1 << 31) will lead to not opening the wallet if flag is unknown