MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / InvalidChainFound

Function InvalidChainFound

src/main.cpp:1774–1787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1772}
1773
1774void static InvalidChainFound(CBlockIndex* pindexNew)
1775{
1776 if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
1777 pindexBestInvalid = pindexNew;
1778
1779 LogPrintf("%s: invalid block=%s height=%d log2_work=%.8g date=%s\n", __func__,
1780 pindexNew->GetBlockHash().ToString(), pindexNew->nHeight,
1781 log(pindexNew->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S",
1782 pindexNew->GetBlockTime()));
1783 LogPrintf("%s: current best=%s height=%d log2_work=%.8g date=%s\n", __func__,
1784 chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0),
1785 DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()));
1786 CheckForkWarningConditions();
1787}
1788
1789void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state,
1790 const BlockSource& blockSource) {

Callers 3

InvalidBlockFoundFunction · 0.85
BOOST_REVERSE_FOREACHFunction · 0.85
InvalidateBlockFunction · 0.85

Calls 8

DateTimeStrFormatFunction · 0.85
getdoubleMethod · 0.80
HeightMethod · 0.80
ToStringMethod · 0.45
GetBlockHashMethod · 0.45
GetBlockTimeMethod · 0.45
TipMethod · 0.45

Tested by

no test coverage detected