diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -408,7 +408,6 @@ //! Load a keypool entry void LoadKeyPool(int64_t nIndex, const CKeyPool &keypool) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); - bool TopUpKeyPool(unsigned int kpSize = 0); bool NewKeyPool(); void MarkPreSplitKeys() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -16,7 +16,7 @@ CTxDestination &dest, std::string &error) { error.clear(); - TopUpKeyPool(); + TopUp(); // Generate a new key that is added to wallet CPubKey new_key; @@ -234,10 +234,6 @@ ReturnKey(index, internal, pubkey); } -bool LegacyScriptPubKeyMan::TopUp(unsigned int size) { - return TopUpKeyPool(size); -} - void LegacyScriptPubKeyMan::MarkUnusedAddresses(const CScript &script) { AssertLockHeld(cs_wallet); // extract addresses and check if they match with an unused keypool key @@ -250,7 +246,7 @@ __func__); MarkReserveKeysAsUsed(mi->second); - if (!TopUpKeyPool()) { + if (!TopUp()) { WalletLogPrintf( "%s: Topping up keypool failed (locked wallet)\n", __func__); @@ -356,7 +352,7 @@ } // Regenerate the keypool if upgraded to HD if (hd_upgrade) { - if (!TopUpKeyPool()) { + if (!TopUp()) { error = _("Unable to generate keys").translated; return false; } @@ -1006,7 +1002,7 @@ m_pool_key_to_index.clear(); - if (!TopUpKeyPool()) { + if (!TopUp()) { return false; } @@ -1014,7 +1010,7 @@ return true; } -bool LegacyScriptPubKeyMan::TopUpKeyPool(unsigned int kpSize) { +bool LegacyScriptPubKeyMan::TopUp(unsigned int kpSize) { if (!CanGenerateKeys()) { return false; } @@ -1146,7 +1142,7 @@ { LOCK(cs_wallet); - TopUpKeyPool(); + TopUp(); bool fReturningInternal = fRequestedInternal; fReturningInternal &=