MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / PruneBlockFilesManual

Function PruneBlockFilesManual

src/validation.cpp:3937–3944  ·  view source on GitHub ↗

This function is called from the RPC code for pruneblockchain */

Source from the content-addressed store, hash-verified

3935
3936/* This function is called from the RPC code for pruneblockchain */
3937void PruneBlockFilesManual(int nManualPruneHeight)
3938{
3939 CValidationState state;
3940 const CChainParams& chainparams = Params();
3941 if (!FlushStateToDisk(chainparams, state, FlushStateMode::NONE, nManualPruneHeight)) {
3942 LogPrintf("%s: failed to flush state (%s)\n", __func__, FormatStateMessage(state));
3943 }
3944}
3945
3946/**
3947 * Prune block and undo files (blk???.dat and undo???.dat) so that the disk space used is less than a user-defined target.

Callers 1

pruneblockchainFunction · 0.85

Calls 3

FlushStateToDiskFunction · 0.85
FormatStateMessageFunction · 0.85
ParamsClass · 0.70

Tested by

no test coverage detected