diff options
author | Andrew Chow <achow101-github@achow101.com> | 2019-11-04 11:00:26 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-01-23 16:35:08 -0500 |
commit | 01b4511206e399981a77976deb15785d18db46ae (patch) | |
tree | 227d03ed606e9f6f459e013558260847af8b97cf /src | |
parent | 4a7e43e8460127a40a7895519587399feff3b682 (diff) | |
download | bitcoin-01b4511206e399981a77976deb15785d18db46ae.tar.xz |
Make UpgradeKeyMetadata work only on LegacyScriptPubKeyMan
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); } |