From eb8b22d5176d7abc6f93b4473df446105ca595e6 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 19 Dec 2021 13:39:25 -0800 Subject: [PATCH] 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 --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 0ddb275e519..967c1f00f34 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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;