Skip to content

Commit 3756853

Browse files
committed
docs: Move FindFilesToPrune{,Manual} doxygen comment
[META] This is a pure comment commit. They belong in the member declarations in the header file.
1 parent 485899a commit 3756853

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/validation.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -3993,7 +3993,6 @@ void UnlinkPrunedFiles(const std::set<int>& setFilesToPrune)
39933993
}
39943994
}
39953995

3996-
/* Calculate the block/rev files to delete based on height specified by user with RPC command pruneblockchain */
39973996
void BlockManager::FindFilesToPruneManual(std::set<int>& setFilesToPrune, int nManualPruneHeight, int chain_tip_height)
39983997
{
39993998
assert(fPruneMode && nManualPruneHeight > 0);
@@ -4028,21 +4027,6 @@ void PruneBlockFilesManual(int nManualPruneHeight)
40284027
}
40294028
}
40304029

4031-
/**
4032-
* Prune block and undo files (blk???.dat and undo???.dat) so that the disk space used is less than a user-defined target.
4033-
* The user sets the target (in MB) on the command line or in config file. This will be run on startup and whenever new
4034-
* space is allocated in a block or undo file, staying below the target. Changing back to unpruned requires a reindex
4035-
* (which in this case means the blockchain must be re-downloaded.)
4036-
*
4037-
* Pruning functions are called from FlushStateToDisk when the global fCheckForPruning flag has been set.
4038-
* Block and undo files are deleted in lock-step (when blk00003.dat is deleted, so is rev00003.dat.)
4039-
* Pruning cannot take place until the longest chain is at least a certain length (100000 on mainnet, 1000 on testnet, 1000 on regtest).
4040-
* Pruning will never delete a block within a defined distance (currently 288) from the active chain's tip.
4041-
* The block index is updated by unsetting HAVE_DATA and HAVE_UNDO for any blocks that were stored in the deleted files.
4042-
* A db flag records the fact that at least some block files have been pruned.
4043-
*
4044-
* @param[out] setFilesToPrune The set of file indices that can be unlinked will be returned
4045-
*/
40464030
void BlockManager::FindFilesToPrune(std::set<int>& setFilesToPrune, uint64_t nPruneAfterHeight, int chain_tip_height, bool is_ibd)
40474031
{
40484032
LOCK2(cs_main, cs_LastBlockFile);

src/validation.h

+17-1
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,24 @@ class BlockManager
361361
friend CChainState;
362362

363363
private:
364-
// See definition for documentation
364+
/* Calculate the block/rev files to delete based on height specified by user with RPC command pruneblockchain */
365365
void FindFilesToPruneManual(std::set<int>& setFilesToPrune, int nManualPruneHeight, int chain_tip_height);
366+
367+
/**
368+
* Prune block and undo files (blk???.dat and undo???.dat) so that the disk space used is less than a user-defined target.
369+
* The user sets the target (in MB) on the command line or in config file. This will be run on startup and whenever new
370+
* space is allocated in a block or undo file, staying below the target. Changing back to unpruned requires a reindex
371+
* (which in this case means the blockchain must be re-downloaded.)
372+
*
373+
* Pruning functions are called from FlushStateToDisk when the global fCheckForPruning flag has been set.
374+
* Block and undo files are deleted in lock-step (when blk00003.dat is deleted, so is rev00003.dat.)
375+
* Pruning cannot take place until the longest chain is at least a certain length (100000 on mainnet, 1000 on testnet, 1000 on regtest).
376+
* Pruning will never delete a block within a defined distance (currently 288) from the active chain's tip.
377+
* The block index is updated by unsetting HAVE_DATA and HAVE_UNDO for any blocks that were stored in the deleted files.
378+
* A db flag records the fact that at least some block files have been pruned.
379+
*
380+
* @param[out] setFilesToPrune The set of file indices that can be unlinked will be returned
381+
*/
366382
void FindFilesToPrune(std::set<int>& setFilesToPrune, uint64_t nPruneAfterHeight, int chain_tip_height, bool is_ibd);
367383

368384
public:

0 commit comments

Comments
 (0)