From 40566e21c02ddec6458cd83fa76fea081c5469dc Mon Sep 17 00:00:00 2001 From: Jadi Date: Wed, 8 Jun 2022 08:10:29 -0400 Subject: [PATCH] If -prune=0 is set, Uncheck Prune on Intro page If the bitcoin-qt is started with -prune=0 arg, On the Intro page, the Prune Checkbox will be unchecked too, to prevent confusions. refs: https://github.com/bitcoin/bitcoin/issues/25052 Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> --- src/qt/intro.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index f4928951fe5..4c8b33bf288 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -287,7 +287,7 @@ void Intro::setStatus(int status, const QString &message, quint64 bytesAvailable ui->freeSpace->setText(""); } else { m_bytes_available = bytesAvailable; - if (ui->prune->isEnabled()) { + if (ui->prune->isEnabled() && !(gArgs.IsArgSet("-prune") && gArgs.GetIntArg("-prune", 0) == 0)) { ui->prune->setChecked(m_bytes_available < (m_blockchain_size_gb + m_chain_state_size_gb + 10) * GB_BYTES); } UpdateFreeSpaceLabel();