diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index f1e432f2e..6dc5d403c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3256,7 +3256,6 @@ bool ReserveDestination::GetReservedDestination(CTxDestination& dest, bool inter fInternal = keypool.fInternal; } assert(vchPubKey.IsValid()); - m_spk_man->LearnRelatedScripts(vchPubKey, type); address = GetDestinationForKey(vchPubKey, type); dest = address; return true; @@ -3264,8 +3263,10 @@ bool ReserveDestination::GetReservedDestination(CTxDestination& dest, bool inter void ReserveDestination::KeepDestination() { - if (nIndex != -1) + if (nIndex != -1) { m_spk_man->KeepDestination(nIndex); + m_spk_man->LearnRelatedScripts(vchPubKey, type); + } nIndex = -1; vchPubKey = CPubKey(); address = CNoDestination();