mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-13 02:17:01 +02:00
util: Replace magics with DEFAULT_PRUNE_TARGET_GB
This commit does not change behavior.
This commit is contained in:
@ -51,4 +51,7 @@ static const int TOOLTIP_WRAP_THRESHOLD = 80;
|
||||
/* One gigabyte (GB) in bytes */
|
||||
static constexpr uint64_t GB_BYTES{1000000000};
|
||||
|
||||
// Default prune target displayed in GUI.
|
||||
static constexpr int DEFAULT_PRUNE_TARGET_GB{2};
|
||||
|
||||
#endif // BITCOIN_QT_GUICONSTANTS_H
|
||||
|
@ -135,7 +135,7 @@ Intro::Intro(QWidget *parent, uint64_t blockchain_size, uint64_t chain_state_siz
|
||||
ui->prune->setChecked(true);
|
||||
ui->prune->setEnabled(false);
|
||||
}
|
||||
ui->prune->setText(tr("Discard blocks after verification, except most recent %1 GB (prune)").arg(pruneTarget ? pruneTarget / 1000 : 2));
|
||||
ui->prune->setText(tr("Discard blocks after verification, except most recent %1 GB (prune)").arg(pruneTarget ? pruneTarget / 1000 : DEFAULT_PRUNE_TARGET_GB));
|
||||
requiredSpace = m_blockchain_size;
|
||||
QString storageRequiresMsg = tr("At least %1 GB of data will be stored in this directory, and it will grow over time.");
|
||||
if (pruneTarget) {
|
||||
|
@ -91,7 +91,7 @@ void OptionsModel::Init(bool resetSettings)
|
||||
if (!settings.contains("bPrune"))
|
||||
settings.setValue("bPrune", false);
|
||||
if (!settings.contains("nPruneSize"))
|
||||
settings.setValue("nPruneSize", 2);
|
||||
settings.setValue("nPruneSize", DEFAULT_PRUNE_TARGET_GB);
|
||||
SetPrune(settings.value("bPrune").toBool());
|
||||
|
||||
if (!settings.contains("nDatabaseCache"))
|
||||
|
Reference in New Issue
Block a user