| 328 | } |
| 329 | |
| 330 | void TestLoadWallet(const std::string& name, DatabaseFormat format, std::function<void(std::shared_ptr<CWallet>)> f) |
| 331 | { |
| 332 | node::NodeContext node; |
| 333 | auto chain{interfaces::MakeChain(node)}; |
| 334 | DatabaseOptions options; |
| 335 | options.require_format = format; |
| 336 | DatabaseStatus status; |
| 337 | bilingual_str error; |
| 338 | std::vector<bilingual_str> warnings; |
| 339 | auto database{MakeWalletDatabase(name, options, status, error)}; |
| 340 | auto wallet{std::make_shared<CWallet>(chain.get(), "", std::move(database))}; |
| 341 | BOOST_CHECK_EQUAL(wallet->PopulateWalletFromDB(error, warnings), DBErrors::LOAD_OK); |
| 342 | WITH_LOCK(wallet->cs_wallet, f(wallet)); |
| 343 | } |
| 344 | |
| 345 | BOOST_FIXTURE_TEST_CASE(LoadReceiveRequests, TestingSetup) |
| 346 | { |
no test coverage detected