mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
util: Add PruneGBtoMiB() function
This commit does not change behavior.
This commit is contained in:
parent
e35e4b2ba0
commit
2bede28cd9
2 changed files with 7 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue