Skip to content

Commit eb8b22d

Browse files
committed
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>
1 parent 80e1c55 commit eb8b22d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2166,7 +2166,7 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
21662166
block.vtx.size(),
21672167
nInputs,
21682168
nSigOpsCost,
2169-
GetTimeMicros() - nTimeStart // in microseconds (µs)
2169+
nTime5 - nTimeStart // in microseconds (µs)
21702170
);
21712171

21722172
return true;

0 commit comments

Comments
 (0)