aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r--src/qt/optionsmodel.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index b4b5b32311..977076c4c2 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -240,9 +240,8 @@ void OptionsModel::SetPruneEnabled(bool prune, bool force)
{
QSettings settings;
settings.setValue("bPrune", prune);
- // Convert prune size from GB to MiB:
- const uint64_t nPruneSizeMiB = (settings.value("nPruneSize").toInt() * GB_BYTES) >> 20;
- std::string prune_val = prune ? std::to_string(nPruneSizeMiB) : "0";
+ const int64_t prune_target_mib = PruneGBtoMiB(settings.value("nPruneSize").toInt());
+ std::string prune_val = prune ? std::to_string(prune_target_mib) : "0";
if (force) {
m_node.forceSetArg("-prune", prune_val);
return;