diff options
| author | Andrew Chow <[email protected]> | 2019-11-04 11:00:26 -0500 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2020-01-23 16:35:08 -0500 |
| commit | 01b4511206e399981a77976deb15785d18db46ae (patch) | |
| tree | 227d03ed606e9f6f459e013558260847af8b97cf /src/wallet | |
| parent | Store p2sh scripts in AddAndGetDestinationForScript (diff) | |
| download | discoin-01b4511206e399981a77976deb15785d18db46ae.tar.xz discoin-01b4511206e399981a77976deb15785d18db46ae.zip | |
Make UpgradeKeyMetadata work only on LegacyScriptPubKeyMan
Diffstat (limited to 'src/wallet')
| -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 224996af1..45c8de2ea 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); } |