Addressing: #15813.
Instead of requiring constant 50MB of space, this checks chainparams.AssumedBlockchainSize() and chainparams.AssumedChainStateSize() for a more accurate calculation.
This is my first time touching C++ code in Bitcoin, so some questions:
- I adapted this code from the gui: https://github.com/bitcoin/bitcoin/blob/master/src/qt/intro.cpp#L133. From what I can tell,
-prune=1inbitcoindmeans manual pruning but gui treats that as a valid 1MB pruning limit? Clarification on that would be helpful. - Do I need to add a test?
- I added the same check for
datadirandblocksdir. Is that right (and necessary)?
Feedback welcome.