Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/db.h
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | public: | ||||
bool IsMock() const { return fMockDb; } | bool IsMock() const { return fMockDb; } | ||||
/** | /** | ||||
* Verify that database file strFile is OK. If it is not, call the callback | * Verify that database file strFile is OK. If it is not, call the callback | ||||
* to try to recover. | * to try to recover. | ||||
* This must be called BEFORE strFile is opened. | * This must be called BEFORE strFile is opened. | ||||
* Returns true if strFile is OK. | * Returns true if strFile is OK. | ||||
*/ | */ | ||||
enum VerifyResult { VERIFY_OK, RECOVER_OK, RECOVER_FAIL }; | enum class VerifyResult { VERIFY_OK, RECOVER_OK, RECOVER_FAIL }; | ||||
typedef bool (*recoverFunc_type)(const std::string &strFile, | typedef bool (*recoverFunc_type)(const std::string &strFile, | ||||
std::string &out_backup_filename); | std::string &out_backup_filename); | ||||
VerifyResult Verify(const std::string &strFile, | VerifyResult Verify(const std::string &strFile, | ||||
recoverFunc_type recoverFunc, | recoverFunc_type recoverFunc, | ||||
std::string &out_backup_filename); | std::string &out_backup_filename); | ||||
/** | /** | ||||
* Salvage data from a file that Verify says is bad. | * Salvage data from a file that Verify says is bad. | ||||
▲ Show 20 Lines • Show All 325 Lines • Show Last 20 Lines |