Log when trimming block solutions
This commit is contained in:
@@ -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
|
// Now that we have written the block indices to the database, we do not
|
||||||
// need to store solutions for these CBlockIndex objects in memory.
|
// need to store solutions for these CBlockIndex objects in memory.
|
||||||
// cs_main must be held here.
|
// cs_main must be held here.
|
||||||
|
uint32_t nTrimmed = 0;
|
||||||
for (CBlockIndex *pblockindex : vBlocks) {
|
for (CBlockIndex *pblockindex : vBlocks) {
|
||||||
pblockindex->TrimSolution();
|
pblockindex->TrimSolution();
|
||||||
|
++nTrimmed;
|
||||||
}
|
}
|
||||||
|
LogPrintf("%s: trimmed %d solutions from block index\n", __func__, nTrimmed);
|
||||||
}
|
}
|
||||||
// Finally remove any pruned files
|
// Finally remove any pruned files
|
||||||
if (fFlushForPrune)
|
if (fFlushForPrune)
|
||||||
|
|||||||
Reference in New Issue
Block a user