HomePhabricator

[backport#15163] Correct units for "-dbcache" and "-prune"

Description

[backport#15163] Correct units for "-dbcache" and "-prune"

Summary:
6f6514a08090b37b5e8c086015ee4881813ef867 Correct units for "-dbcache" and "-prune" (Hennadii Stepanov)

Pull request description:

Actually, all `dbcache`-related values in the code are measured in MiB (not in megabytes, MB) or in bytes (e.g., `nTotalCache`).

See: https://github.com/bitcoin/bitcoin/blob/master/src/txdb.h

https://github.com/bitcoin/bitcoin/blob/ba8c8b22272ad40fe2de465d7e745532bab48d3b/src/init.cpp#L1405-L1424

Also, "-prune" is fixed:
1. The GUI values in GB are translated to the node values in MiB correctly.
2. The maximum of the "prune" `QSpinBox` is not limited by default value of 99 (GB).

Fix: #15106

Backport of Core PR15163

Test Plan:

ninja all check check-functional

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jan 30 2019, 19:16
majcostaCommitted on Oct 12 2020, 22:25
majcostaPushed on Oct 12 2020, 22:26
Reviewer
Restricted Project
Differential Revision
D7896: [backport#15163] Correct units for "-dbcache" and "-prune"
Parents
rABC227c1121a755: wallet: Recognize -disablewallet option early
Branches
Unknown
Tags
Unknown