diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp index 9a61a4d5679..c73663ded10 100644 --- a/src/wallet/test/coinselector_tests.cpp +++ b/src/wallet/test/coinselector_tests.cpp @@ -159,7 +159,6 @@ inline std::vector& KnapsackGroupOutputs(const CoinsResult& availab static std::unique_ptr NewWallet(const node::NodeContext& m_node, const std::string& wallet_name = "") { std::unique_ptr wallet = std::make_unique(m_node.chain.get(), wallet_name, CreateMockableWalletDatabase()); - BOOST_CHECK(wallet->LoadWallet() == DBErrors::LOAD_OK); LOCK(wallet->cs_wallet); wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS); wallet->SetupDescriptorScriptPubKeyMans(); diff --git a/src/wallet/test/group_outputs_tests.cpp b/src/wallet/test/group_outputs_tests.cpp index f085f4de590..d259f495c3d 100644 --- a/src/wallet/test/group_outputs_tests.cpp +++ b/src/wallet/test/group_outputs_tests.cpp @@ -19,7 +19,6 @@ static int nextLockTime = 0; static std::shared_ptr NewWallet(const node::NodeContext& m_node) { std::unique_ptr wallet = std::make_unique(m_node.chain.get(), "", CreateMockableWalletDatabase()); - wallet->LoadWallet(); LOCK(wallet->cs_wallet); wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS); wallet->SetupDescriptorScriptPubKeyMans(); diff --git a/src/wallet/test/wallet_test_fixture.cpp b/src/wallet/test/wallet_test_fixture.cpp index 57c538e4ef4..a502314c995 100644 --- a/src/wallet/test/wallet_test_fixture.cpp +++ b/src/wallet/test/wallet_test_fixture.cpp @@ -14,7 +14,6 @@ WalletTestingSetup::WalletTestingSetup(const ChainType chainType) m_wallet_loader{interfaces::MakeWalletLoader(*m_node.chain, *Assert(m_node.args))}, m_wallet(m_node.chain.get(), "", CreateMockableWalletDatabase()) { - m_wallet.LoadWallet(); m_chain_notifications_handler = m_node.chain->handleNotifications({ &m_wallet, [](CWallet*) {} }); m_wallet_loader->registerRpcs(); } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 6df74e848b8..44a6983b987 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3687,9 +3687,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) {