mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 06:52:36 +01:00
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;
|
||||
}
|
||||
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();
|
||||
|
|
Loading…
Add table
Reference in a new issue