aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorAndrew Chow <[email protected]>2019-11-04 11:00:26 -0500
committerAndrew Chow <[email protected]>2020-01-23 16:35:08 -0500
commit01b4511206e399981a77976deb15785d18db46ae (patch)
tree227d03ed606e9f6f459e013558260847af8b97cf /src/wallet
parentStore p2sh scripts in AddAndGetDestinationForScript (diff)
downloaddiscoin-01b4511206e399981a77976deb15785d18db46ae.tar.xz
discoin-01b4511206e399981a77976deb15785d18db46ae.zip
Make UpgradeKeyMetadata work only on LegacyScriptPubKeyMan
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp7
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);
}