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

Function PruneBlockFilesManual

src/validation.cpp:4554–4561  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

4552
4553/* This function is called from the RPC code for pruneblockchain */
4554void PruneBlockFilesManual(Chainstate& active_chainstate, int nManualPruneHeight)
4555{
4556 BlockValidationState state;
4557 if (!active_chainstate.FlushStateToDisk(
4558 state, FlushStateMode::NONE, nManualPruneHeight)) {
4559 LogWarning("Failed to flush state after manual prune (%s)", state.ToString());
4560 }
4561}
4562
4563bool Chainstate::LoadChainTip()
4564{

Callers 1

pruneblockchainFunction · 0.85

Calls 2

FlushStateToDiskMethod · 0.80
ToStringMethod · 0.45

Tested by

no test coverage detected