Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.cpp
Show First 20 Lines • Show All 635 Lines • ▼ Show 20 Lines | for (CAccountingEntry &entry : pwallet->laccentries) { | ||||
std::make_pair(entry.nOrderPos, CWallet::TxPair(nullptr, &entry))); | std::make_pair(entry.nOrderPos, CWallet::TxPair(nullptr, &entry))); | ||||
} | } | ||||
return result; | return result; | ||||
} | } | ||||
DBErrors CWalletDB::FindWalletTx(std::vector<TxId> &txIds, | DBErrors CWalletDB::FindWalletTx(std::vector<TxId> &txIds, | ||||
std::vector<CWalletTx> &vWtx) { | std::vector<CWalletTx> &vWtx) { | ||||
bool fNoncriticalErrors = false; | |||||
DBErrors result = DB_LOAD_OK; | DBErrors result = DB_LOAD_OK; | ||||
try { | try { | ||||
int nMinVersion = 0; | int nMinVersion = 0; | ||||
if (batch.Read((std::string) "minversion", nMinVersion)) { | if (batch.Read((std::string) "minversion", nMinVersion)) { | ||||
if (nMinVersion > CLIENT_VERSION) { | if (nMinVersion > CLIENT_VERSION) { | ||||
return DB_TOO_NEW; | return DB_TOO_NEW; | ||||
} | } | ||||
Show All 35 Lines | try { | ||||
} | } | ||||
pcursor->close(); | pcursor->close(); | ||||
} catch (const boost::thread_interrupted &) { | } catch (const boost::thread_interrupted &) { | ||||
throw; | throw; | ||||
} catch (...) { | } catch (...) { | ||||
result = DB_CORRUPT; | result = DB_CORRUPT; | ||||
} | } | ||||
if (fNoncriticalErrors && result == DB_LOAD_OK) { | |||||
result = DB_NONCRITICAL_ERROR; | |||||
} | |||||
return result; | return result; | ||||
} | } | ||||
DBErrors CWalletDB::ZapSelectTx(std::vector<TxId> &txIdsIn, | DBErrors CWalletDB::ZapSelectTx(std::vector<TxId> &txIdsIn, | ||||
std::vector<TxId> &txIdsOut) { | std::vector<TxId> &txIdsOut) { | ||||
// Build list of wallet TXs and hashes. | // Build list of wallet TXs and hashes. | ||||
std::vector<TxId> txIds; | std::vector<TxId> txIds; | ||||
std::vector<CWalletTx> vWtx; | std::vector<CWalletTx> vWtx; | ||||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |