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

Method Verify

src/wallet/db.cpp:165–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165CDBEnv::VerifyResult CDBEnv::Verify(std::string strFile, bool (*recoverFunc)(CDBEnv& dbenv, std::string strFile))
166{
167 LOCK(cs_db);
168 assert(mapFileUseCount.count(strFile) == 0);
169
170 Db db(dbenv, 0);
171 int result = db.verify(strFile.c_str(), NULL, NULL, 0);
172 if (result == 0)
173 return VERIFY_OK;
174 else if (recoverFunc == NULL)
175 return RECOVER_FAIL;
176
177 // Try to recover:
178 bool fRecovered = (*recoverFunc)(*this, strFile);
179 return (fRecovered ? RECOVER_OK : RECOVER_FAIL);
180}
181
182bool CDBEnv::Salvage(std::string strFile, bool fAggressive, std::vector<CDBEnv::KeyValPair>& vResult)
183{

Callers 4

CheckSignatureMethod · 0.45
VerifySignatureFunction · 0.45
StartUpMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 1

countMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.36