MCPcopy Create free account
hub / github.com/ElementsProject/elements / TestLoadWallet

Function TestLoadWallet

src/wallet/test/wallet_tests.cpp:49–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup)
48
49static const std::shared_ptr<CWallet> TestLoadWallet(WalletContext& context)
50{
51 DatabaseOptions options;
52 options.create_flags = WALLET_FLAG_DESCRIPTORS;
53 DatabaseStatus status;
54 bilingual_str error;
55 std::vector<bilingual_str> warnings;
56 auto database = MakeWalletDatabase("", options, status, error);
57 auto wallet = CWallet::Create(context, "", std::move(database), options.create_flags, error, warnings);
58 NotifyWalletLoaded(context, wallet);
59 if (context.chain) {
60 wallet->postInitProcess();
61 }
62 return wallet;
63}
64
65static void TestUnloadWallet(std::shared_ptr<CWallet>&& wallet)
66{

Callers 1

BOOST_FIXTURE_TEST_CASEFunction · 0.85

Calls 3

MakeWalletDatabaseFunction · 0.85
NotifyWalletLoadedFunction · 0.85
postInitProcessMethod · 0.80

Tested by

no test coverage detected