block_connected: re-use previous GetTimeMicros

Shave off an extra 100 or so instructions from the
validation:block_connected tracepoint by reusing a nearby
GetTimeMicros(). This brings the tracepoint down to 54 instructions.
Still high, but much better than the previous ~154 and 8000 instructions
which it was originally.

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin 2021-12-19 13:39:25 -08:00
parent 80e1c55687
commit eb8b22d517

View file

@ -2166,7 +2166,7 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
block.vtx.size(),
nInputs,
nSigOpsCost,
GetTimeMicros() - nTimeStart // in microseconds (µs)
nTime5 - nTimeStart // in microseconds (µs)
);
return true;