Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.h
Show First 20 Lines • Show All 218 Lines • ▼ Show 20 Lines | public: | ||||
DBErrors LoadWallet(CWallet *pwallet); | DBErrors LoadWallet(CWallet *pwallet); | ||||
DBErrors FindWalletTx(std::vector<TxId> &txIds, | DBErrors FindWalletTx(std::vector<TxId> &txIds, | ||||
std::vector<CWalletTx> &vWtx); | std::vector<CWalletTx> &vWtx); | ||||
DBErrors ZapWalletTx(std::vector<CWalletTx> &vWtx); | DBErrors ZapWalletTx(std::vector<CWalletTx> &vWtx); | ||||
DBErrors ZapSelectTx(std::vector<TxId> &txIdsIn, | DBErrors ZapSelectTx(std::vector<TxId> &txIdsIn, | ||||
std::vector<TxId> &txIdsOut); | std::vector<TxId> &txIdsOut); | ||||
/* Try to (very carefully!) recover wallet database (with a possible key | /* Try to (very carefully!) recover wallet database (with a possible key | ||||
* type filter) */ | * type filter) */ | ||||
static bool Recover(const std::string &filename, void *callbackDataIn, | static bool Recover(const fs::path &wallet_path, void *callbackDataIn, | ||||
bool (*recoverKVcallback)(void *callbackData, | bool (*recoverKVcallback)(void *callbackData, | ||||
CDataStream ssKey, | CDataStream ssKey, | ||||
CDataStream ssValue), | CDataStream ssValue), | ||||
std::string &out_backup_filename); | std::string &out_backup_filename); | ||||
/* Recover convenience-function to bypass the key filter callback, called | /* Recover convenience-function to bypass the key filter callback, called | ||||
* when verify fails, recovers everything */ | * when verify fails, recovers everything */ | ||||
static bool Recover(const std::string &filename, | static bool Recover(const fs::path &wallet_path, | ||||
std::string &out_backup_filename); | std::string &out_backup_filename); | ||||
/* Recover filter (used as callback), will only let keys (cryptographical | /* Recover filter (used as callback), will only let keys (cryptographical | ||||
* keys) as KV/key-type pass through */ | * keys) as KV/key-type pass through */ | ||||
static bool RecoverKeysOnlyFilter(void *callbackData, CDataStream ssKey, | static bool RecoverKeysOnlyFilter(void *callbackData, CDataStream ssKey, | ||||
CDataStream ssValue); | CDataStream ssValue); | ||||
/* Function to determine if a certain KV/key-type is a key (cryptographical | /* Function to determine if a certain KV/key-type is a key (cryptographical | ||||
* key) type */ | * key) type */ | ||||
static bool IsKeyType(const std::string &strType); | static bool IsKeyType(const std::string &strType); | ||||
/* verifies the database environment */ | /* verifies the database environment */ | ||||
static bool VerifyEnvironment(const std::string &walletFile, | static bool VerifyEnvironment(const fs::path &wallet_path, | ||||
const fs::path &walletDir, | |||||
std::string &errorStr); | std::string &errorStr); | ||||
/* verifies the database file */ | /* verifies the database file */ | ||||
static bool VerifyDatabaseFile(const std::string &walletFile, | static bool VerifyDatabaseFile(const fs::path &wallet_path, | ||||
const fs::path &walletDir, | |||||
std::string &warningStr, | std::string &warningStr, | ||||
std::string &errorStr); | std::string &errorStr); | ||||
//! write the hdchain model (external chain child index counter) | //! write the hdchain model (external chain child index counter) | ||||
bool WriteHDChain(const CHDChain &chain); | bool WriteHDChain(const CHDChain &chain); | ||||
//! Begin a new transaction | //! Begin a new transaction | ||||
bool TxnBegin(); | bool TxnBegin(); | ||||
Show All 19 Lines |