MCPcopy Create free account
hub / github.com/LUX-Core/lux / InvalidChainFound

Function InvalidChainFound

src/main.cpp:2134–2147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2132}
2133
2134void static InvalidChainFound(CBlockIndex* pindexNew)
2135{
2136 if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
2137 pindexBestInvalid = pindexNew;
2138
2139 LogPrintf("InvalidChainFound: invalid block=%s height=%d log2_work=%.8g date=%s\n",
2140 pindexNew->GetBlockHash().ToString(), pindexNew->nHeight,
2141 log(pindexNew->nChainWork.getdouble()) / log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S",
2142 pindexNew->GetBlockTime()));
2143 LogPrintf("InvalidChainFound: current best=%s height=%d log2_work=%.8g date=%s\n",
2144 chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble()) / log(2.0),
2145 DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()));
2146 CheckForkWarningConditions();
2147}
2148
2149// Compute at which vout of the block's coinbase transaction the witness
2150// commitment occurs, or -1 if not found.

Callers 3

InvalidBlockFoundFunction · 0.85
ActivateBestChainStepFunction · 0.85
InvalidateBlockFunction · 0.85

Calls 8

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

Tested by

no test coverage detected