test: Remove unnecessary LoadWallet() calls
This commit is contained in:
1 parent
2a97ff466d
commit
30c6f64eed
3 files changed
-3
No files matched your search
@@ -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 = "")
|
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());
|
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);
|
LOCK(wallet->cs_wallet);
|
||||||
wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
|
wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
|
||||||
wallet->SetupDescriptorScriptPubKeyMans();
|
wallet->SetupDescriptorScriptPubKeyMans();
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ static int nextLockTime = 0;
|
|||||||
static std::shared_ptr<CWallet> NewWallet(const node::NodeContext& m_node)
|
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());
|
std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>(m_node.chain.get(), "", CreateMockableWalletDatabase());
|
||||||
wallet->LoadWallet();
|
|
||||||
LOCK(wallet->cs_wallet);
|
LOCK(wallet->cs_wallet);
|
||||||
wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
|
wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
|
||||||
wallet->SetupDescriptorScriptPubKeyMans();
|
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_loader{interfaces::MakeWalletLoader(*m_node.chain, *Assert(m_node.args))},
|
||||||
m_wallet(m_node.chain.get(), "", CreateMockableWalletDatabase())
|
m_wallet(m_node.chain.get(), "", CreateMockableWalletDatabase())
|
||||||
{
|
{
|
||||||
m_wallet.LoadWallet();
|
|
||||||
m_chain_notifications_handler = m_node.chain->handleNotifications({ &m_wallet, [](CWallet*) {} });
|
m_chain_notifications_handler = m_node.chain->handleNotifications({ &m_wallet, [](CWallet*) {} });
|
||||||
m_wallet_loader->registerRpcs();
|
m_wallet_loader->registerRpcs();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user