Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/db.h
Show First 20 Lines • Show All 249 Lines • ▼ Show 20 Lines | public: | ||||
/* flush the wallet passively (TRY_LOCK) | /* flush the wallet passively (TRY_LOCK) | ||||
ideal to be called periodically */ | ideal to be called periodically */ | ||||
static bool PeriodicFlush(BerkeleyDatabase &database); | static bool PeriodicFlush(BerkeleyDatabase &database); | ||||
/* verifies the database environment */ | /* verifies the database environment */ | ||||
static bool VerifyEnvironment(const fs::path &file_path, | static bool VerifyEnvironment(const fs::path &file_path, | ||||
std::string &errorStr); | std::string &errorStr); | ||||
/* verifies the database file */ | /* verifies the database file */ | ||||
static bool | static bool | ||||
VerifyDatabaseFile(const fs::path &file_path, std::string &warningStr, | VerifyDatabaseFile(const fs::path &file_path, | ||||
std::vector<std::string> &warnings, | |||||
std::string &errorStr, | std::string &errorStr, | ||||
BerkeleyEnvironment::recoverFunc_type recoverFunc); | BerkeleyEnvironment::recoverFunc_type recoverFunc); | ||||
public: | public: | ||||
template <typename K, typename T> bool Read(const K &key, T &value) { | template <typename K, typename T> bool Read(const K &key, T &value) { | ||||
if (!pdb) { | if (!pdb) { | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 190 Lines • Show Last 20 Lines |