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 committed 2022-01-12 09:27:37 -08:00
1 parent 80e1c55687
commit eb8b22d517
1 file changed
+1 -1
+1 -1
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;