mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
test: Remove unnecessary LoadWallet() calls
This commit is contained in:
@@ -159,7 +159,6 @@ inline std::vector<OutputGroup>& KnapsackGroupOutputs(const CoinsResult& availab
|
||||
static std::unique_ptr<CWallet> NewWallet(const node::NodeContext& m_node, const std::string& wallet_name = "")
|
||||
{
|
||||
std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>(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();
|
||||
|
||||
@@ -19,7 +19,6 @@ static int nextLockTime = 0;
|
||||
static std::shared_ptr<CWallet> NewWallet(const node::NodeContext& m_node)
|
||||
{
|
||||
std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>(m_node.chain.get(), "", CreateMockableWalletDatabase());
|
||||
wallet->LoadWallet();
|
||||
LOCK(wallet->cs_wallet);
|
||||
wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
|
||||
wallet->SetupDescriptorScriptPubKeyMans();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user