5#include <chainparams.h>
21 wallet->WalletLogPrintf(
"Releasing wallet\n");
50 std::unique_ptr<WalletDatabase> database =
65 }
catch (
const std::runtime_error &) {
68 "Error loading %s. Is wallet being used by another process?\n",
81 "Error reading %s! All keys read correctly, but transaction "
82 "data or address book entries might be missing or incorrect.",
86 "Error loading %s: Wallet requires newer version of %s",
91 "Wallet needed to be rewritten: restart %s to complete",
110 tfm::format(std::cout,
"Wallet info\n===========\n");
113 tfm::format(std::cout,
"HD (hd seed available): %s\n",
124 const std::string &
name) {
144 }
else if (
command ==
"salvage") {
146 std::vector<bilingual_str>
warnings;
149 for (
const auto &warning :
warnings) {
152 if (!
error.empty()) {
An encapsulated public key.
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
DBErrors LoadWallet(bool &fFirstRunRet)
bool error(const char *fmt, const Args &...args)
static path PathFromString(const std::string &string)
Convert byte string to path object.
fs::path AbsPathJoin(const fs::path &base, const fs::path &path)
Helper function for joining two paths.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
bool RecoverDatabaseFile(const fs::path &file_path, bilingual_str &error, std::vector< bilingual_str > &warnings)
std::unique_ptr< WalletDatabase > MakeDatabase(const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
DBErrors
Error statuses for the wallet database.
fs::path GetWalletDir()
Get the path of the wallet directory.