Skip to content

Commit 01b4511

Browse files
committed
Make UpgradeKeyMetadata work only on LegacyScriptPubKeyMan
1 parent 4a7e43e commit 01b4511

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,12 @@ void CWallet::UpgradeKeyMetadata()
265265
return;
266266
}
267267

268-
if (m_spk_man) {
269-
m_spk_man->UpgradeKeyMetadata();
268+
auto spk_man = GetLegacyScriptPubKeyMan();
269+
if (!spk_man) {
270+
return;
270271
}
272+
273+
spk_man->UpgradeKeyMetadata();
271274
SetWalletFlag(WALLET_FLAG_KEY_ORIGIN_METADATA);
272275
}
273276

0 commit comments

Comments
 (0)