| 2132 | } |
| 2133 | |
| 2134 | void 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. |
no test coverage detected