- The
TopUp()
inCWallet::GetNewChangeDestination
is unnecessary as currently m_spk_man calls TopUp further down the call stack inside LegacyScriptPubKeyMan::ReserveKeyFromKeyPool (called by LegacyScriptPubKeyMan::GetReservedDestination). This also lets us prepare for future changes with multiple ScriptPubKeyMans in the wallet. - An opportunistic
TopUp()
is moved fromLegacyScriptPubKeyMan::GetNewDestination
toCWallet::GetNewDestination
. - Another opportunistic
TopUp()
is moved fromLegacyScriptPubKeyMan::ReserveKeyFromKeyPool
Moving opportunistic TopUps ensures that ScriptPubKeyMans will always be topped up before requesting Destinations from them as we cannot always rely on future ScriptPubKeyMan implementaions topping up internally.
See also: #17373 (review)