Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | public: | ||||
* validationinterface callback. | * validationinterface callback. | ||||
* | * | ||||
* @returns true unless a system error occurred | * @returns true unless a system error occurred | ||||
*/ | */ | ||||
bool ActivateBestChain(const Config &config, BlockValidationState &state, | bool ActivateBestChain(const Config &config, BlockValidationState &state, | ||||
std::shared_ptr<const CBlock> pblock = nullptr) | std::shared_ptr<const CBlock> pblock = nullptr) | ||||
EXCLUSIVE_LOCKS_REQUIRED(!m_chainstate_mutex) LOCKS_EXCLUDED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(!m_chainstate_mutex) LOCKS_EXCLUDED(cs_main); | ||||
bool AcceptBlock(const Config &config, | bool AcceptBlock( | ||||
const std::shared_ptr<const CBlock> &pblock, | const Config &config, const std::shared_ptr<const CBlock> &pblock, | ||||
BlockValidationState &state, bool fRequested, | BlockValidationState &state, bool fRequested, const FlatFilePos *dbp, | ||||
const FlatFilePos *dbp, bool *fNewBlock) | bool *fNewBlock, | ||||
bool fPostConsensus = | |||||
false) // TODO rename to better indicate that this flag is for | |||||
// additional post-consensus rules enforced by the avalanche | |||||
// post-consensus mechanism, and not post-consensus itself | |||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
// Block (dis)connection on a given view: | // Block (dis)connection on a given view: | ||||
DisconnectResult DisconnectBlock(const CBlock &block, | DisconnectResult DisconnectBlock(const CBlock &block, | ||||
const CBlockIndex *pindex, | const CBlockIndex *pindex, | ||||
CCoinsViewCache &view); | CCoinsViewCache &view); | ||||
bool ConnectBlock(const CBlock &block, BlockValidationState &state, | bool ConnectBlock(const CBlock &block, BlockValidationState &state, | ||||
CBlockIndex *pindex, CCoinsViewCache &view, | CBlockIndex *pindex, CCoinsViewCache &view, | ||||
▲ Show 20 Lines • Show All 418 Lines • Show Last 20 Lines |