wallet: LearnRelatedScripts only if KeepDestination
This commit is contained in:
parent
55295fba4c
commit
3958295bc8
1 changed files with 3 additions and 2 deletions
|
@ -3256,7 +3256,6 @@ bool ReserveDestination::GetReservedDestination(CTxDestination& dest, bool inter
|
||||||
fInternal = keypool.fInternal;
|
fInternal = keypool.fInternal;
|
||||||
}
|
}
|
||||||
assert(vchPubKey.IsValid());
|
assert(vchPubKey.IsValid());
|
||||||
m_spk_man->LearnRelatedScripts(vchPubKey, type);
|
|
||||||
address = GetDestinationForKey(vchPubKey, type);
|
address = GetDestinationForKey(vchPubKey, type);
|
||||||
dest = address;
|
dest = address;
|
||||||
return true;
|
return true;
|
||||||
|
@ -3264,8 +3263,10 @@ bool ReserveDestination::GetReservedDestination(CTxDestination& dest, bool inter
|
||||||
|
|
||||||
void ReserveDestination::KeepDestination()
|
void ReserveDestination::KeepDestination()
|
||||||
{
|
{
|
||||||
if (nIndex != -1)
|
if (nIndex != -1) {
|
||||||
m_spk_man->KeepDestination(nIndex);
|
m_spk_man->KeepDestination(nIndex);
|
||||||
|
m_spk_man->LearnRelatedScripts(vchPubKey, type);
|
||||||
|
}
|
||||||
nIndex = -1;
|
nIndex = -1;
|
||||||
vchPubKey = CPubKey();
|
vchPubKey = CPubKey();
|
||||||
address = CNoDestination();
|
address = CNoDestination();
|
||||||
|
|
Loading…
Reference in a new issue