diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -979,7 +979,7 @@ return m_pool_key_to_index; } /** Does the wallet have at least min_keys in the keypool? */ - bool HasUnusedKeys(int min_keys) const; + bool HasUnusedKeys(size_t min_keys) const; std::set> GetAddressGroupings(); std::map GetAddressBalances(); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3778,7 +3778,7 @@ } } -bool CWallet::HasUnusedKeys(int min_keys) const { +bool CWallet::HasUnusedKeys(size_t min_keys) const { return setExternalKeyPool.size() >= min_keys && (setInternalKeyPool.size() >= min_keys || !CanSupportFeature(FEATURE_HD_SPLIT));