Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/db.h
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | DbTxn *TxnBegin(int flags = DB_TXN_WRITE_NOSYNC) { | ||||
if (!ptxn || ret != 0) return nullptr; | if (!ptxn || ret != 0) return nullptr; | ||||
return ptxn; | return ptxn; | ||||
} | } | ||||
}; | }; | ||||
/** Return whether a wallet database is currently loaded. */ | /** Return whether a wallet database is currently loaded. */ | ||||
bool IsWalletLoaded(const fs::path &wallet_path); | bool IsWalletLoaded(const fs::path &wallet_path); | ||||
/** | |||||
* Given a wallet directory path or legacy file path, return path to main data | |||||
* file in the wallet database. */ | |||||
fs::path WalletDataFilePath(const fs::path &wallet_path); | |||||
/** Get BerkeleyEnvironment and database filename given a wallet path. */ | /** Get BerkeleyEnvironment and database filename given a wallet path. */ | ||||
std::shared_ptr<BerkeleyEnvironment> | std::shared_ptr<BerkeleyEnvironment> | ||||
GetWalletEnv(const fs::path &wallet_path, std::string &database_filename); | GetWalletEnv(const fs::path &wallet_path, std::string &database_filename); | ||||
/** | /** | ||||
* An instance of this class represents one database. | * An instance of this class represents one database. | ||||
* For BerkeleyDB this is just a (env, strFile) tuple. | * For BerkeleyDB this is just a (env, strFile) tuple. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 337 Lines • Show Last 20 Lines |