Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 5,689 Lines • ▼ Show 20 Lines | try { | ||||
LogPrintf("Dumped mempool: %gs to copy, %gs to dump\n", | LogPrintf("Dumped mempool: %gs to copy, %gs to dump\n", | ||||
(mid - start) * MICRO, (last - mid) * MICRO); | (mid - start) * MICRO, (last - mid) * MICRO); | ||||
} catch (const std::exception &e) { | } catch (const std::exception &e) { | ||||
LogPrintf("Failed to dump mempool: %s. Continuing anyway.\n", e.what()); | LogPrintf("Failed to dump mempool: %s. Continuing anyway.\n", e.what()); | ||||
} | } | ||||
} | } | ||||
//! Guess how far we are in the verification process at the given block index | //! Guess how far we are in the verification process at the given block index | ||||
//! require cs_main if pindex has not been validated yet (because nChainTx might | |||||
//! be unset) | |||||
deadalnix: That sounds like something that would benefit from an AssertLockHeld to make sure the debug… | |||||
double GuessVerificationProgress(const ChainTxData &data, | double GuessVerificationProgress(const ChainTxData &data, | ||||
const CBlockIndex *pindex) { | const CBlockIndex *pindex) { | ||||
if (pindex == nullptr) { | if (pindex == nullptr) { | ||||
return 0.0; | return 0.0; | ||||
} | } | ||||
int64_t nNow = time(nullptr); | int64_t nNow = time(nullptr); | ||||
Show All 23 Lines |
That sounds like something that would benefit from an AssertLockHeld to make sure the debug build can tell us if that comment has been ignored.