mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Make UpgradeKeyMetadata work only on LegacyScriptPubKeyMan
This commit is contained in:
@@ -265,9 +265,12 @@ void CWallet::UpgradeKeyMetadata()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_spk_man) {
|
||||
m_spk_man->UpgradeKeyMetadata();
|
||||
auto spk_man = GetLegacyScriptPubKeyMan();
|
||||
if (!spk_man) {
|
||||
return;
|
||||
}
|
||||
|
||||
spk_man->UpgradeKeyMetadata();
|
||||
SetWalletFlag(WALLET_FLAG_KEY_ORIGIN_METADATA);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user