mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 06:30:10 +01:00
tracing: correctly scope utxocache:flush tracepoint
Previously, the `utxocache:flush` tracepoint was in the wrong scope and reached every time `CChainState::FlushStateToDisk` was called, even when there was no flushing of the cache. The tracepoint is now properly scoped and will be reached during a full flush. Inside the scope, the `fDoFullFlush` value will always be `true`, so it doesn't need to be logged separately. Hence, it's dropped from the tracepoint arguments.
This commit is contained in:
@@ -2324,14 +2324,13 @@ bool CChainState::FlushStateToDisk(
|
||||
return AbortNode(state, "Failed to write to coin database");
|
||||
nLastFlush = nNow;
|
||||
full_flush_completed = true;
|
||||
TRACE5(utxocache, flush,
|
||||
(int64_t)(GetTimeMicros() - nNow.count()), // in microseconds (µs)
|
||||
(u_int32_t)mode,
|
||||
(u_int64_t)coins_count,
|
||||
(u_int64_t)coins_mem_usage,
|
||||
(bool)fFlushForPrune);
|
||||
}
|
||||
TRACE6(utxocache, flush,
|
||||
(int64_t)(GetTimeMicros() - nNow.count()), // in microseconds (µs)
|
||||
(u_int32_t)mode,
|
||||
(u_int64_t)coins_count,
|
||||
(u_int64_t)coins_mem_usage,
|
||||
(bool)fFlushForPrune,
|
||||
(bool)fDoFullFlush);
|
||||
}
|
||||
if (full_flush_completed) {
|
||||
// Update best block in wallet (so we can detect restored wallets).
|
||||
|
||||
Reference in New Issue
Block a user