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

Method Flush

src/wallet/bdb.cpp:369–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369void BerkeleyBatch::Flush()
370{
371 if (activeTxn)
372 return;
373
374 // Flush database activity from memory pool to disk log
375 unsigned int nMinutes = 0;
376 if (fReadOnly)
377 nMinutes = 1;
378
379 if (env) { // env is nullptr for dummy databases (i.e. in tests). Don't actually flush if env is nullptr so we don't segfault
380 env->dbenv->txn_checkpoint(nMinutes ? gArgs.GetIntArg("-dblogsize", DEFAULT_WALLET_DBLOGSIZE) * 1024 : 0, nMinutes, 0);
381 }
382}
383
384void BerkeleyDatabase::IncrementUpdateCounter()
385{

Callers 14

CloseMethod · 0.45
WriteICMethod · 0.45
EraseICMethod · 0.45
FlushWalletsFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
SimulationTestFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
FUZZ_TARGET_INITFunction · 0.45
FUZZ_TARGETFunction · 0.45

Calls 4

GetTimeMillisFunction · 0.85
PathFromStringFunction · 0.85
GetIntArgMethod · 0.80
getMethod · 0.45

Tested by 8

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
SimulationTestFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
FUZZ_TARGET_INITFunction · 0.36
FUZZ_TARGETFunction · 0.36