HomePhabricator

[backport#15801] GUI: Set the range of pruning size before loading its value

Description

[backport#15801] GUI: Set the range of pruning size before loading its value

Summary:
PR description:

This fixes two bugs:

  • The prune setting range was set after loading the current value. If users had a prune of (eg) 200, it would get limited to 99 before the range was raised. This is fixed by setting the range first.
  • The prune setting was limited to <= the chainparams' "assumed blockchain size". There's no reason for this limit (the UX is the same either way), and there are use cases it breaks (eg, setting a prune size such that it begins pruning at some future point). Therefore, I raised it to the max value.

Backport of Core PR15801

Test Plan:
ninja && ninja check

Build and install bitcoin-qt, check that this setting is not limited to current blockchain size.
Menu Settings -> Options -> Main -> Prune block storage to ___ Gb

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

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

Details

Provenance
Luke Dashjr <luke-jr+git@utopios.org>Authored on Oct 13 2020, 13:55
PiRKCommitted on Oct 13 2020, 13:55
abc-botPushed on Oct 13 2020, 14:00
Reviewer
Restricted Owners Package
Differential Revision
D7900: [backport#15801] GUI: Set the range of pruning size before loading its value
Parents
rABCbc053489c59e: doc: Fix typos in COPYRIGHT
Branches
Unknown
Tags
Unknown