wallet: move Assert() check into constructor

This puts it in a function body, so that __func__ is available
for reporting any assertion failure.
This commit is contained in:
Anthony Towns committed 2022-03-30 17:07:28 +10:00
1 parent 2f0f056e08
commit 7c9fe25c16
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -9,6 +9,7 @@
namespace wallet {
WalletTestingSetup::WalletTestingSetup(const std::string& chainName)
: TestingSetup(chainName),
m_wallet_loader{interfaces::MakeWalletLoader(*m_node.chain, *Assert(m_node.args))},
m_wallet(m_node.chain.get(), "", m_args, CreateMockWalletDatabase())
{
m_wallet.LoadWallet();
+1 -1
View File
@@ -22,7 +22,7 @@ struct WalletTestingSetup : public TestingSetup {
explicit WalletTestingSetup(const std::string& chainName = CBaseChainParams::MAIN);
~WalletTestingSetup();
std::unique_ptr<interfaces::WalletLoader> m_wallet_loader = interfaces::MakeWalletLoader(*m_node.chain, *Assert(m_node.args));
std::unique_ptr<interfaces::WalletLoader> m_wallet_loader;
CWallet m_wallet;
std::unique_ptr<interfaces::Handler> m_chain_notifications_handler;
};