Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 5,748 Lines • ▼ Show 20 Lines | try { | ||||
(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()); | ||||
return false; | return false; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
bool IsBlockPruned(const CBlockIndex *pblockindex) { | |||||
return (fHavePruned && !pblockindex->nStatus.hasData() && | |||||
pblockindex->nTx > 0); | |||||
} | |||||
//! 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 | //! require cs_main if pindex has not been validated yet (because nChainTx might | ||||
//! be unset) | //! be unset) | ||||
//! This conditional lock requirement might be confusing, see: | //! This conditional lock requirement might be confusing, see: | ||||
//! https://github.com/bitcoin/bitcoin/issues/15994 | //! https://github.com/bitcoin/bitcoin/issues/15994 | ||||
double GuessVerificationProgress(const ChainTxData &data, | double GuessVerificationProgress(const ChainTxData &data, | ||||
const CBlockIndex *pindex) { | const CBlockIndex *pindex) { | ||||
if (pindex == nullptr) { | if (pindex == nullptr) { | ||||
Show All 28 Lines |