Skip to content

Commit bb2c8ce

Browse files
committed
keypool: Remove superfluous topup from CWallet::GetNewChangeDestination
This does not change behavior. This TopUp() is unnecessary as currently m_spk_man calls TopUp further down the call stack inside LegacyScriptPubKeyMan::ReserveKeyFromKeyPool (called by LegacyScriptPubKeyMan::GetReservedDestination) By removing this here, we also prepare for future changes where CWallet has multiple ScriptPubKeyMans instead of m_spk_man.
1 parent 0b79caf commit bb2c8ce

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3122,8 +3122,6 @@ bool CWallet::GetNewChangeDestination(const OutputType type, CTxDestination& des
31223122
{
31233123
error.clear();
31243124

3125-
m_spk_man->TopUp();
3126-
31273125
ReserveDestination reservedest(this, type);
31283126
if (!reservedest.GetReservedDestination(dest, true)) {
31293127
error = "Error: Keypool ran out, please call keypoolrefill first";

0 commit comments

Comments
 (0)