diff --git a/src/qt/forms/intro.ui b/src/qt/forms/intro.ui index db1b567049..ac3b6c7328 100644 --- a/src/qt/forms/intro.ui +++ b/src/qt/forms/intro.ui @@ -219,6 +219,13 @@ + + + + pruneGB + + + diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index e91722795c..f66eba1fef 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -148,6 +148,7 @@ Intro::Intro(QWidget *parent, int64_t blockchain_size_gb, int64_t chain_state_si } ui->pruneGB->setValue(m_prune_target_gb); ui->pruneGB->setToolTip(ui->prune->toolTip()); + ui->lblPruneSuffix->setToolTip(ui->prune->toolTip()); UpdatePruneLabels(ui->prune->isChecked()); connect(ui->prune, &QCheckBox::toggled, [this](bool prune_checked) { @@ -381,6 +382,10 @@ void Intro::UpdatePruneLabels(bool prune_checked) } ui->lblExplanation3->setVisible(prune_checked); ui->pruneGB->setEnabled(prune_checked); + static constexpr uint64_t nPowTargetSpacing = 10 * 60; // from chainparams, which we don't have at this stage + static constexpr uint32_t expected_block_data_size = 2250000; // includes undo data + const uint64_t expected_backup_days = m_prune_target_gb * 1e9 / (uint64_t(expected_block_data_size) * 86400 / nPowTargetSpacing); + ui->lblPruneSuffix->setText(tr("(sufficient to restore backups %n day(s) old)", "block chain pruning", expected_backup_days)); ui->sizeWarningLabel->setText( tr("%1 will download and store a copy of the Bitcoin block chain.").arg(PACKAGE_NAME) + " " + storageRequiresMsg.arg(m_required_space_gb) + " " +