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