diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index bc0e24d74..10c834cb3 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3668,15 +3668,11 @@ void CWallet::MarkReserveKeysAsUsed(int64_t keypool_id) m_pool_key_to_index.erase(keypool.vchPubKey.GetID()); } walletdb.ErasePool(index); + LogPrintf("keypool index %d removed\n", index); it = setKeyPool->erase(it); } } -bool CWallet::HasUnusedKeys(int min_keys) const -{ - return setExternalKeyPool.size() >= min_keys && (setInternalKeyPool.size() >= min_keys || !CanSupportFeature(FEATURE_HD_SPLIT)); -} - void CWallet::GetScriptForMining(std::shared_ptr &script) { std::shared_ptr rKey = std::make_shared(this); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 19e1638d3..48a25666f 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -984,8 +984,6 @@ public: */ void MarkReserveKeysAsUsed(int64_t keypool_id); const std::map& GetAllReserveKeys() const { return m_pool_key_to_index; } - /** Does the wallet have at least min_keys in the keypool? */ - bool HasUnusedKeys(int min_keys) const; std::set< std::set > GetAddressGroupings(); std::map GetAddressBalances();