Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/db.h
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | explicit BerkeleyBatch(BerkeleyDatabase &database, | ||||
bool fFlushOnCloseIn = true); | bool fFlushOnCloseIn = true); | ||||
~BerkeleyBatch() { Close(); } | ~BerkeleyBatch() { Close(); } | ||||
BerkeleyBatch(const BerkeleyBatch &) = delete; | BerkeleyBatch(const BerkeleyBatch &) = delete; | ||||
BerkeleyBatch &operator=(const BerkeleyBatch &) = delete; | BerkeleyBatch &operator=(const BerkeleyBatch &) = delete; | ||||
void Flush(); | void Flush(); | ||||
void Close(); | void Close(); | ||||
static bool Recover(const fs::path &file_path, void *callbackDataIn, | |||||
bool (*recoverKVcallback)(void *callbackData, | |||||
CDataStream ssKey, | |||||
CDataStream ssValue), | |||||
std::string &out_backup_filename); | |||||
/* 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, | ||||
bilingual_str &errorStr); | bilingual_str &errorStr); | ||||
/* verifies the database file */ | /* verifies the database file */ | ||||
▲ Show 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | bool TxnAbort() { | ||||
activeTxn = nullptr; | activeTxn = nullptr; | ||||
return (ret == 0); | return (ret == 0); | ||||
} | } | ||||
static bool Rewrite(BerkeleyDatabase &database, | static bool Rewrite(BerkeleyDatabase &database, | ||||
const char *pszSkip = nullptr); | const char *pszSkip = nullptr); | ||||
}; | }; | ||||
bool RecoverDatabaseFile(const fs::path &file_path, void *callbackDataIn, | |||||
bool (*recoverKVcallback)(void *callbackData, | |||||
CDataStream ssKey, | |||||
CDataStream ssValue), | |||||
std::string &out_backup_filename); | |||||
#endif // BITCOIN_WALLET_DB_H | #endif // BITCOIN_WALLET_DB_H |