Prune configuration doesn't work during import

Fix pruning functionality during -reindex or -loadblock, which are mechanisms that allow rebuilding chainstate without redownloading blocks.
Checked Out
Check Out Task
Task Bounty Details


Bitcoin Issue


Estimated Effort

Checked Out

Current Status


Paid in USD or equivalent BTC upon acceptance

Bitcoin Issue

Pruning is a process by which a bitcoin node can limit the amount of disk space it consumes by discarding block files that have been validated and are buried by a certain amount of chain work.

Reindexing is the process of rebuilding chainstate using block data that already resides on disk.

From the original issue:

It appears that -prune is ignored during import (-reindex, or -loadblock).

For example starting with an empty datadir, prune=80000, and all block files passed in via -loadblock [doesn't result in pruning occurring.]

Prerequisite Skills


Code Guidelines

Repository Code Guidelines Page

Definition of Done

Get a PR merged that closes the issue

Check Out Task