mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge #17696: qt: Force set nPruneSize in QSettings after the intro dialog
af112ab628qt: Rename SetPrune() to InitializePruneSetting() (Hennadii Stepanov)b0bfbe5028refactor: Drop `bool force' parameter (Hennadii Stepanov)68c9bbe9bcqt: Force set nPruneSize in QSettings after intro (Hennadii Stepanov)a82bd8fa57util: Replace magics with DEFAULT_PRUNE_TARGET_GB (Hennadii Stepanov) Pull request description: On master (5622d8f315), having `QSettings` set already ``` $ grep nPruneSize ~/.config/Bitcoin/Bitcoin-Qt-testnet.conf nPruneSize=6 ``` enabling prune option in the intro dialog ``` $ ./src/qt/bitcoin-qt -choosedatadir -testnet ```  has no effect: ``` $ grep Prune ~/.bitcoin/testnet3/debug.log 2019-12-08T10:04:41Z Prune configured to target 5722 MiB on disk for block and undo files. ``` --- With this PR: ``` $ grep Prune ~/.bitcoin/testnet3/debug.log 2019-12-08T10:20:35Z Prune configured to target 1907 MiB on disk for block and undo files. ``` This PR has been split of #17453 (the first two commits) as it fixes an orthogonal bug. Refs: - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r345424240 - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r350960201 ACKs for top commit: Sjors: Code review re-ACKaf112ab628ryanofsky: Code review ACKaf112ab628. Just suggested changes since last review (thanks!) promag: Tested ACKaf112ab628. Latest suggestions and changes look good to me. Tree-SHA512: 8ddad34b30dcc2cdcad6678ba8a0b36fa176e4e3465862ef6eee9be0f98d8146705138c9c7995dd8c0990af41078ca743fef1a90ed9240081f052f32ddec72b9
This commit is contained in:
@@ -73,7 +73,8 @@ public:
|
||||
const QString& getOverriddenByCommandLine() { return strOverriddenByCommandLine; }
|
||||
|
||||
/* Explicit setters */
|
||||
void SetPrune(bool prune, bool force = false);
|
||||
void SetPruneEnabled(bool prune, bool force = false);
|
||||
void SetPruneTargetGB(int prune_target_gb, bool force = false);
|
||||
|
||||
/* Restart flag helper */
|
||||
void setRestartRequired(bool fRequired);
|
||||
|
||||
Reference in New Issue
Block a user