Skip to content

Commit 6b13cd3

Browse files
committed
Create LegacyScriptPubKeyMan when not a descriptor wallet
1 parent aeac157 commit 6b13cd3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3834,8 +3834,10 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain,
38343834

38353835
walletInstance->SetWalletFlags(wallet_creation_flags, false);
38363836

3837-
// Always create LegacyScriptPubKeyMan for now
3838-
walletInstance->SetupLegacyScriptPubKeyMan();
3837+
// Only create LegacyScriptPubKeyMan when not descriptor wallet
3838+
if (!walletInstance->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) {
3839+
walletInstance->SetupLegacyScriptPubKeyMan();
3840+
}
38393841

38403842
if (!(wallet_creation_flags & (WALLET_FLAG_DISABLE_PRIVATE_KEYS | WALLET_FLAG_BLANK_WALLET))) {
38413843
LOCK(walletInstance->cs_wallet);

0 commit comments

Comments
 (0)