| 576 | } |
| 577 | } |
| 578 | util::Result<std::unique_ptr<Wallet>> loadWallet(const std::string& name, std::vector<bilingual_str>& warnings) override |
| 579 | { |
| 580 | DatabaseOptions options; |
| 581 | DatabaseStatus status; |
| 582 | ReadDatabaseArgs(*m_context.args, options); |
| 583 | options.require_existing = true; |
| 584 | bilingual_str error; |
| 585 | std::unique_ptr<Wallet> wallet{MakeWallet(m_context, LoadWallet(m_context, name, /*load_on_start=*/true, options, status, error, warnings))}; |
| 586 | if (wallet) { |
| 587 | return wallet; |
| 588 | } else { |
| 589 | return util::Error{error}; |
| 590 | } |
| 591 | } |
| 592 | util::Result<std::unique_ptr<Wallet>> restoreWallet(const fs::path& backup_file, const std::string& wallet_name, std::vector<bilingual_str>& warnings, bool load_after_restore) override |
| 593 | { |
| 594 | DatabaseStatus status; |
no test coverage detected