MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / EnvShutdown

Method EnvShutdown

src/wallet/db.cpp:41–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void CDBEnv::EnvShutdown()
42{
43 if (!fDbEnvInit)
44 return;
45
46 fDbEnvInit = false;
47 int ret = dbenv->close(0);
48 if (ret != 0)
49 LogPrint(BCLog::CDB,"CDBEnv::EnvShutdown: Error %d shutting down database environment: %s\n", ret, DbEnv::strerror(ret));
50 if (!fMockDb)
51 {
52 string te = path.string();
53 ret= DbEnv(0).remove(te.c_str(), 0);
54 if (ret != 0)
55 LogPrint(BCLog::CDB,"CDBEnv::remove: Error %d shutting down database environment: %s\n", ret, DbEnv::strerror(ret));
56
57 }
58 CloseErrFile();
59}
60
61void CDBEnv::Reset()
62{

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected