Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/wallet_tests.cpp
Show All 28 Lines | |||||
#include <memory> | #include <memory> | ||||
#include <vector> | #include <vector> | ||||
BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup) | BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup) | ||||
static std::shared_ptr<CWallet> TestLoadWallet(interfaces::Chain &chain) { | static std::shared_ptr<CWallet> TestLoadWallet(interfaces::Chain &chain) { | ||||
bilingual_str error; | bilingual_str error; | ||||
std::vector<bilingual_str> warnings; | std::vector<bilingual_str> warnings; | ||||
auto wallet = CWallet::CreateWalletFromFile( | auto wallet = CWallet::CreateWalletFromFile(chain, WalletLocation(""), | ||||
chain.params(), chain, WalletLocation(""), error, warnings); | error, warnings); | ||||
wallet->postInitProcess(); | wallet->postInitProcess(); | ||||
return wallet; | return wallet; | ||||
} | } | ||||
static void TestUnloadWallet(std::shared_ptr<CWallet> &&wallet) { | static void TestUnloadWallet(std::shared_ptr<CWallet> &&wallet) { | ||||
SyncWithValidationInterfaceQueue(); | SyncWithValidationInterfaceQueue(); | ||||
wallet->m_chain_notifications_handler.reset(); | wallet->m_chain_notifications_handler.reset(); | ||||
UnloadWallet(std::move(wallet)); | UnloadWallet(std::move(wallet)); | ||||
▲ Show 20 Lines • Show All 861 Lines • Show Last 20 Lines |