Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/db.h
Show First 20 Lines • Show All 438 Lines • ▼ Show 20 Lines | bool TxnAbort() { | ||||
if (!pdb || !activeTxn) { | if (!pdb || !activeTxn) { | ||||
return false; | return false; | ||||
} | } | ||||
int ret = activeTxn->abort(); | int ret = activeTxn->abort(); | ||||
activeTxn = nullptr; | activeTxn = nullptr; | ||||
return (ret == 0); | return (ret == 0); | ||||
} | } | ||||
bool ReadVersion(int &nVersion) { | |||||
nVersion = 0; | |||||
return Read(std::string("version"), nVersion); | |||||
} | |||||
bool WriteVersion(int nVersion) { | |||||
return Write(std::string("version"), nVersion); | |||||
} | |||||
static bool Rewrite(BerkeleyDatabase &database, | static bool Rewrite(BerkeleyDatabase &database, | ||||
const char *pszSkip = nullptr); | const char *pszSkip = nullptr); | ||||
}; | }; | ||||
#endif // BITCOIN_WALLET_DB_H | #endif // BITCOIN_WALLET_DB_H |