Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/walletdb_tests.cpp
Show All 15 Lines | |||||
#include <memory> | #include <memory> | ||||
namespace { | namespace { | ||||
static std::unique_ptr<CWallet> LoadWallet(WalletBatch &batch) { | static std::unique_ptr<CWallet> LoadWallet(WalletBatch &batch) { | ||||
NodeContext node; | NodeContext node; | ||||
auto chain = interfaces::MakeChain(node, Params()); | auto chain = interfaces::MakeChain(node, Params()); | ||||
std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>( | std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>( | ||||
Params(), chain.get(), WalletLocation(), WalletDatabase::CreateDummy()); | chain.get(), WalletLocation(), WalletDatabase::CreateDummy()); | ||||
DBErrors res = batch.LoadWallet(wallet.get()); | DBErrors res = batch.LoadWallet(wallet.get()); | ||||
BOOST_CHECK(res == DBErrors::LOAD_OK); | BOOST_CHECK(res == DBErrors::LOAD_OK); | ||||
return wallet; | return wallet; | ||||
} | } | ||||
} // namespace | } // namespace | ||||
BOOST_FIXTURE_TEST_SUITE(walletdb_tests, WalletTestingSetup) | BOOST_FIXTURE_TEST_SUITE(walletdb_tests, WalletTestingSetup) | ||||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |