diff options
| author | Andrew Chow <[email protected]> | 2019-07-17 17:54:15 -0400 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2020-04-23 13:25:50 -0400 |
| commit | 6b13cd3fa854dfaeb9e269bff3d67cacc0e5b5dc (patch) | |
| tree | 93c0fc541faeed6bb7adfe87049935b38aa12205 /src | |
| parent | Return nullptr from GetLegacyScriptPubKeyMan if descriptor wallet (diff) | |
| download | discoin-6b13cd3fa854dfaeb9e269bff3d67cacc0e5b5dc.tar.xz discoin-6b13cd3fa854dfaeb9e269bff3d67cacc0e5b5dc.zip | |
Create LegacyScriptPubKeyMan when not a descriptor wallet
Diffstat (limited to 'src')
| -rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a5ae1d617..3ee8984b4 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); |