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

Method Verify

src/wallet/db.cpp:151–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151CDBEnv::VerifyResult CDBEnv::Verify(const std::string& strFile, bool (*recoverFunc)(CDBEnv& dbenv, const std::string& strFile))
152{
153 LOCK(cs_db);
154 assert(mapFileUseCount.count(strFile) == 0);
155
156 Db db(dbenv, 0);
157 int result = db.verify(strFile.c_str(), NULL, NULL, 0);
158 if (result == 0)
159 return VERIFY_OK;
160 else if (recoverFunc == NULL)
161 return RECOVER_FAIL;
162
163 // Try to recover:
164 bool fRecovered = (*recoverFunc)(*this, strFile);
165 return (fRecovered ? RECOVER_OK : RECOVER_FAIL);
166}
167
168bool CDBEnv::Salvage(const std::string& strFile, bool fAggressive, std::vector<CDBEnv::KeyValPair>& vResult)
169{

Callers 2

VerifySignatureMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 2

countMethod · 0.80
verifyMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.36