MCPcopy Create free account
hub / github.com/ElementsProject/elements / SetPruneEnabled

Method SetPruneEnabled

src/qt/optionsmodel.cpp:283–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void OptionsModel::SetPruneEnabled(bool prune, bool force)
284{
285 QSettings settings;
286 settings.setValue("bPrune", prune);
287 const int64_t prune_target_mib = PruneGBtoMiB(settings.value("nPruneSize").toInt());
288 std::string prune_val = prune ? ToString(prune_target_mib) : "0";
289 if (force) {
290 gArgs.ForceSetArg("-prune", prune_val);
291 return;
292 }
293 if (!gArgs.SoftSetArg("-prune", prune_val)) {
294 addOverriddenOption("-prune");
295 }
296}
297
298void OptionsModel::SetPruneTargetGB(int prune_target_gb, bool force)
299{

Callers

nothing calls this directly

Calls 6

PruneGBtoMiBFunction · 0.85
ForceSetArgMethod · 0.80
SoftSetArgMethod · 0.80
ToStringFunction · 0.50
setValueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected