diff options
| author | Hennadii Stepanov <[email protected]> | 2019-11-12 12:09:10 +0200 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2020-01-08 00:12:32 +0200 |
| commit | 68c9bbe9bc91f882404556998666b1b5acea60e4 (patch) | |
| tree | 429b2ae01af8f97b3e998e6bc2d14bcbd9667f40 /src/qt/bitcoin.cpp | |
| parent | util: Replace magics with DEFAULT_PRUNE_TARGET_GB (diff) | |
| download | discoin-68c9bbe9bc91f882404556998666b1b5acea60e4.tar.xz discoin-68c9bbe9bc91f882404556998666b1b5acea60e4.zip | |
qt: Force set nPruneSize in QSettings after intro
If QSettings is set already, it is required to force set nPruneSize
after the intro dialog.
Diffstat (limited to 'src/qt/bitcoin.cpp')
| -rw-r--r-- | src/qt/bitcoin.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 676c15ea4..9bee00901 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -281,8 +281,11 @@ void BitcoinApplication::parameterSetup() m_node.initParameterInteraction(); } -void BitcoinApplication::SetPrune(bool prune, bool force) { - optionsModel->SetPrune(prune, force); +void BitcoinApplication::SetPrune(bool prune, bool force) +{ + // If prune is set, intentionally override existing prune size with + // the default size since this is called when choosing a new datadir. + optionsModel->SetPruneTargetGB(prune ? DEFAULT_PRUNE_TARGET_GB : 0, force); } void BitcoinApplication::requestInitialize() |