From 2a2391f0f998dff837a9806603e3f423740a7f1b Mon Sep 17 00:00:00 2001 From: Duke Date: Wed, 27 Dec 2023 11:43:53 -0500 Subject: [PATCH] Log when trimming block solutions --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 714dc36e6..a41f040e6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3713,9 +3713,12 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) { // Now that we have written the block indices to the database, we do not // need to store solutions for these CBlockIndex objects in memory. // cs_main must be held here. + uint32_t nTrimmed = 0; for (CBlockIndex *pblockindex : vBlocks) { pblockindex->TrimSolution(); + ++nTrimmed; } + LogPrintf("%s: trimmed %d solutions from block index\n", __func__, nTrimmed); } // Finally remove any pruned files if (fFlushForPrune)