aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-07-17 17:54:15 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-04-23 13:25:50 -0400
commit6b13cd3fa854dfaeb9e269bff3d67cacc0e5b5dc (patch)
tree93c0fc541faeed6bb7adfe87049935b38aa12205 /src/wallet
parentaeac157c9dc141546b45e06ba9c2e641ad86083f (diff)
Create LegacyScriptPubKeyMan when not a descriptor wallet
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index a5ae1d6174..3ee8984b4f 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3834,8 +3834,10 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain,
walletInstance->SetWalletFlags(wallet_creation_flags, false);
- // Always create LegacyScriptPubKeyMan for now
- walletInstance->SetupLegacyScriptPubKeyMan();
+ // Only create LegacyScriptPubKeyMan when not descriptor wallet
+ if (!walletInstance->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) {
+ walletInstance->SetupLegacyScriptPubKeyMan();
+ }
if (!(wallet_creation_flags & (WALLET_FLAG_DISABLE_PRIVATE_KEYS | WALLET_FLAG_BLANK_WALLET))) {
LOCK(walletInstance->cs_wallet);