1414bool LegacyScriptPubKeyMan::GetNewDestination (const OutputType type, CTxDestination& dest, std::string& error)
1515{
1616 error.clear ();
17- TopUpKeyPool ();
17+ TopUp ();
1818
1919 // Generate a new key that is added to wallet
2020 CPubKey new_key;
@@ -282,11 +282,6 @@ void LegacyScriptPubKeyMan::ReturnDestination(int64_t index, bool internal, cons
282282 ReturnKey (index, internal, pubkey);
283283}
284284
285- bool LegacyScriptPubKeyMan::TopUp (unsigned int size)
286- {
287- return TopUpKeyPool (size);
288- }
289-
290285void LegacyScriptPubKeyMan::MarkUnusedAddresses (const CScript& script)
291286{
292287 AssertLockHeld (cs_wallet);
@@ -297,7 +292,7 @@ void LegacyScriptPubKeyMan::MarkUnusedAddresses(const CScript& script)
297292 WalletLogPrintf (" %s: Detected a used keypool key, mark all keypool key up to this key as used\n " , __func__);
298293 MarkReserveKeysAsUsed (mi->second );
299294
300- if (!TopUpKeyPool ()) {
295+ if (!TopUp ()) {
301296 WalletLogPrintf (" %s: Topping up keypool failed (locked wallet)\n " , __func__);
302297 }
303298 }
@@ -401,7 +396,7 @@ bool LegacyScriptPubKeyMan::Upgrade(int prev_version, std::string& error)
401396 }
402397 // Regenerate the keypool if upgraded to HD
403398 if (hd_upgrade) {
404- if (!TopUpKeyPool ()) {
399+ if (!TopUp ()) {
405400 error = _ (" Unable to generate keys" ).translated ;
406401 return false ;
407402 }
@@ -1029,15 +1024,15 @@ bool LegacyScriptPubKeyMan::NewKeyPool()
10291024
10301025 m_pool_key_to_index.clear ();
10311026
1032- if (!TopUpKeyPool ()) {
1027+ if (!TopUp ()) {
10331028 return false ;
10341029 }
10351030 WalletLogPrintf (" LegacyScriptPubKeyMan::NewKeyPool rewrote keypool\n " );
10361031 }
10371032 return true ;
10381033}
10391034
1040- bool LegacyScriptPubKeyMan::TopUpKeyPool (unsigned int kpSize)
1035+ bool LegacyScriptPubKeyMan::TopUp (unsigned int kpSize)
10411036{
10421037 if (!CanGenerateKeys ()) {
10431038 return false ;
@@ -1154,7 +1149,7 @@ bool LegacyScriptPubKeyMan::ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& key
11541149 {
11551150 LOCK (cs_wallet);
11561151
1157- TopUpKeyPool ();
1152+ TopUp ();
11581153
11591154 bool fReturningInternal = fRequestedInternal ;
11601155 fReturningInternal &= (IsHDEnabled () && m_storage.CanSupportFeature (FEATURE_HD_SPLIT)) || m_storage.IsWalletFlagSet (WALLET_FLAG_DISABLE_PRIVATE_KEYS);
0 commit comments