MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / InvalidBlockFound

Method InvalidBlockFound

src/validation.cpp:1994–2003  ·  view source on GitHub ↗

Same as InvalidChainFound, above, except not called directly from InvalidateBlock, which does its own setBlockIndexCandidates management.

Source from the content-addressed store, hash-verified

1992// Same as InvalidChainFound, above, except not called directly from InvalidateBlock,
1993// which does its own setBlockIndexCandidates management.
1994void Chainstate::InvalidBlockFound(CBlockIndex* pindex, const BlockValidationState& state)
1995{
1996 AssertLockHeld(cs_main);
1997 if (state.GetResult() != BlockValidationResult::BLOCK_MUTATED) {
1998 pindex->nStatus |= BLOCK_FAILED_VALID;
1999 m_blockman.m_dirty_blockindex.insert(pindex);
2000 setBlockIndexCandidates.erase(pindex);
2001 InvalidChainFound(pindex);
2002 }
2003}
2004
2005void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, CTxUndo &txundo, int nHeight)
2006{

Callers 1

AcceptBlockMethod · 0.45

Calls 3

GetResultMethod · 0.80
insertMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected