HomePhabricator

prune, import: allows pruning to work during the loadblock import process

Description

prune, import: allows pruning to work during the loadblock import process

Summary:
allows pruning to work during the loadblock import process.

This is a backport of core#24957

Depends on D15003

Test Plan:
Backup the eCash data dir, create a bootstrap.dat file by following the instructions in contrib/linearize, then delete the content of the data dir, comment out config options that are incompatible with pruning (txindex=1) then
src/bitcoind -prune=550 -loadblock=/data/bootstrap.dat

Check while the node is importing the blocks from bootstrap.dat that the new data dir does not grow significantly larger than 550 MB (I saw it oscillates between that target and 800 MB, while the bootstrap.dat file was 21 GB of blocks 0--313000)

ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D15004

Details

Provenance
mruddy <6440430+mruddy@users.noreply.github.com>Authored on Apr 24 2022, 12:00
PiRKCommitted on Dec 19 2023, 09:25
PiRKPushed on Dec 19 2023, 09:25
Reviewer
Restricted Project
Differential Revision
D15004: prune, import: allows pruning to work during the loadblock import process
Parents
rABCa4ff6eb1a952: refactor: Add BlockManager getters
Branches
Unknown
Tags
Unknown