aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorArnab Sen <arnabsen1729@gmail.com>2021-12-22 11:57:44 +0530
committerArnab Sen <arnabsen1729@gmail.com>2021-12-30 19:30:17 +0530
commit36a65847033540cf2203252c7baf42bc5ec97579 (patch)
tree42a6b5c9e7c09b5d23d104eba11696806f104211 /src/validation.cpp
parent5d911336998ee0b15f28bd7c96e0e56e7b878979 (diff)
downloadbitcoin-36a65847033540cf2203252c7baf42bc5ec97579.tar.xz
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.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index c521e9b634..eb46741ba0 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -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).