MERGE FIX: ConnectTip: ub fix for bench

This commit is contained in:
Gregory Sanders 2019-01-29 13:04:37 +00:00
parent 80857b3299
commit 4f4fe8f6c7

View file

@ -1884,6 +1884,7 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl
}
view.SetBestBlock(pindex->GetBlockHash());
}
nBlocksTotal++;
return true;
}
@ -1950,6 +1951,7 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl
}
int64_t nTime1 = GetTimeMicros(); nTimeCheck += nTime1 - nTimeStart;
assert(nBlocksTotal > 0);
LogPrint(BCLog::BENCH, " - Sanity checks: %.2fms [%.2fs (%.2fms/blk)]\n", MILLI * (nTime1 - nTimeStart), nTimeCheck * MICRO, nTimeCheck * MILLI / nBlocksTotal);
// Do not allow blocks that contain transactions which 'overwrite' older transactions,