diff --git a/src/keystore.h b/src/keystore.h --- a/src/keystore.h +++ b/src/keystore.h @@ -61,9 +61,4 @@ CKeyID GetKeyForDestination(const CBasicKeyStore &store, const CTxDestination &dest); -/** - * Checks if a CKey is in the given CBasicKeystore compressed or otherwise - */ -bool HaveKey(const CBasicKeyStore &store, const CKey &key); - #endif // BITCOIN_KEYSTORE_H diff --git a/src/keystore.cpp b/src/keystore.cpp --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -169,10 +169,3 @@ } return CKeyID(); } - -bool HaveKey(const CBasicKeyStore &store, const CKey &key) { - CKey key2; - key2.Set(key.begin(), key.end(), !key.IsCompressed()); - return store.HaveKey(key.GetPubKey().GetID()) || - store.HaveKey(key2.GetPubKey().GetID()); -} diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -56,6 +56,16 @@ return avoid_reuse; } +/** + * Checks if a CKey is in the given CWallet compressed or otherwise + */ +bool HaveKey(const CWallet &wallet, const CKey &key) { + CKey key2; + key2.Set(key.begin(), key.end(), !key.IsCompressed()); + return wallet.HaveKey(key.GetPubKey().GetID()) || + wallet.HaveKey(key2.GetPubKey().GetID()); +} + bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest &request, std::string &wallet_name) { if (request.URI.substr(0, WALLET_ENDPOINT_BASE.size()) ==