MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetClosestWalletFeature

Function GetClosestWalletFeature

src/wallet/walletutil.cpp:38–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38WalletFeature GetClosestWalletFeature(int version)
39{
40 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};
41 for (const WalletFeature& wf : wallet_features) {
42 if (version >= wf) return wf;
43 }
44 return static_cast<WalletFeature>(0);
45}
46} // namespace wallet

Callers 1

UpgradeWalletMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected