mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-12 09:52:21 +02:00
wallet: LearnRelatedScripts only if KeepDestination
This commit is contained in:
parent
55295fba4c
commit
3958295bc8
@ -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…
x
Reference in New Issue
Block a user