Skip to content

Commit 7c9fe25

Browse files
committed
wallet: move Assert() check into constructor
This puts it in a function body, so that __func__ is available for reporting any assertion failure.
1 parent 2f0f056 commit 7c9fe25

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/wallet/test/wallet_test_fixture.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
namespace wallet {
1010
WalletTestingSetup::WalletTestingSetup(const std::string& chainName)
1111
: TestingSetup(chainName),
12+
m_wallet_loader{interfaces::MakeWalletLoader(*m_node.chain, *Assert(m_node.args))},
1213
m_wallet(m_node.chain.get(), "", m_args, CreateMockWalletDatabase())
1314
{
1415
m_wallet.LoadWallet();

src/wallet/test/wallet_test_fixture.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct WalletTestingSetup : public TestingSetup {
2222
explicit WalletTestingSetup(const std::string& chainName = CBaseChainParams::MAIN);
2323
~WalletTestingSetup();
2424

25-
std::unique_ptr<interfaces::WalletLoader> m_wallet_loader = interfaces::MakeWalletLoader(*m_node.chain, *Assert(m_node.args));
25+
std::unique_ptr<interfaces::WalletLoader> m_wallet_loader;
2626
CWallet m_wallet;
2727
std::unique_ptr<interfaces::Handler> m_chain_notifications_handler;
2828
};

0 commit comments

Comments
 (0)