diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index c7df818745..4973c8f25a 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3656,9 +3656,7 @@ util::Result> CWallet::AddWall { AssertLockHeld(cs_wallet); - if (!IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) { - return util::Error{_("Cannot add WalletDescriptor to a non-descriptor wallet")}; - } + Assert(IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)); auto spk_man = GetDescriptorScriptPubKeyMan(desc); if (spk_man) {