diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 224996af15..45c8de2eab 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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); } |