mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Merge bitcoin/bitcoin#23907: tracing: utxocache tracepoints follow up for #22902
799968e8b3tracing: misc follow-ups to 22902 (0xb10c)36a6584703tracing: correctly scope utxocache:flush tracepoint (Arnab Sen) Pull request description: This PR is a follow-up to the [#22902](https://github.com/bitcoin/bitcoin/pull/22902). Previously, the tracepoint `utxocache:flush` was called, even when it was not flushing. So, the tracepoint is now scoped to write only when coins cache to disk. ACKs for top commit: 0xB10C: ACK799968e8b3Tree-SHA512: ebb096cbf991c551c81e4339821f10d9768c14cf3d8cb14d0ad851acff5980962228a1c746914c6aba3bdb27e8be53b33349c41efe8bab5542f639916e437b5f
This commit is contained in:
@@ -2373,14 +2373,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