mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
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.
This commit is contained in:
parent
0b79caf658
commit
bb2c8ce23c
1 changed files with 0 additions and 2 deletions
|
|
@ -3122,8 +3122,6 @@ bool CWallet::GetNewChangeDestination(const OutputType type, CTxDestination& des
|
||||||
{
|
{
|
||||||
error.clear();
|
error.clear();
|
||||||
|
|
||||||
m_spk_man->TopUp();
|
|
||||||
|
|
||||||
ReserveDestination reservedest(this, type);
|
ReserveDestination reservedest(this, type);
|
||||||
if (!reservedest.GetReservedDestination(dest, true)) {
|
if (!reservedest.GetReservedDestination(dest, true)) {
|
||||||
error = "Error: Keypool ran out, please call keypoolrefill first";
|
error = "Error: Keypool ran out, please call keypoolrefill first";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue