From d3c5e47391e2f158001e3e199d625852c7f18998 Mon Sep 17 00:00:00 2001 From: pablomartin4btc Date: Mon, 28 Jul 2025 15:30:11 -0300 Subject: [PATCH] wallet, refactor: Remove Legacy check and error Remove dead code due to legacy wallet removal. --- src/wallet/wallet.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) {