MCPcopy Create free account
hub / github.com/ElementsProject/elements / BerkeleyBatch

Method BerkeleyBatch

src/wallet/bdb.cpp:307–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase& database, const bool read_only, bool fFlushOnCloseIn) : pdb(nullptr), activeTxn(nullptr), m_cursor(nullptr), m_database(database)
308{
309 database.AddRef();
310 database.Open();
311 fReadOnly = read_only;
312 fFlushOnClose = fFlushOnCloseIn;
313 env = database.env.get();
314 pdb = database.m_db.get();
315 strFile = database.strFile;
316 if (!Exists(std::string("version"))) {
317 bool fTmp = fReadOnly;
318 fReadOnly = false;
319 Write(std::string("version"), CLIENT_VERSION);
320 fReadOnly = fTmp;
321 }
322}
323
324void BerkeleyDatabase::Open()
325{

Callers

nothing calls this directly

Calls 3

AddRefMethod · 0.45
OpenMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected