Re-PR from https://github.com/bitcoin/bitcoin/pull/18729
Now includes a bugfix too (-prune=2+ disabled the checkbox, but -prune=0/1 did not; this behaviour is necessary since -prune overrides GUI settings)
Re-PR from https://github.com/bitcoin/bitcoin/pull/18729
Now includes a bugfix too (-prune=2+ disabled the checkbox, but -prune=0/1 did not; this behaviour is necessary since -prune overrides GUI settings)
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | hebasto |
| Stale ACK | hernanmarino |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--174a7506f384e20aa4161008e828411d-->
No conflicts as of last run.
cr ACK 76cb0898198e19c164f9d649560c472b7bc5fafd and tested ACK
288 | @@ -287,8 +289,9 @@ void Intro::setStatus(int status, const QString &message, quint64 bytesAvailable 289 | ui->freeSpace->setText(""); 290 | } else { 291 | m_bytes_available = bytesAvailable; 292 | - if (ui->prune->isEnabled() && !(gArgs.IsArgSet("-prune") && gArgs.GetIntArg("-prune", 0) == 0)) { 293 | + if (ui->prune->isEnabled() && m_prune_checkbox_is_default) { 294 | ui->prune->setChecked(m_bytes_available < (m_blockchain_size_gb + m_chain_state_size_gb + 10) * GB_BYTES); 295 | + m_prune_checkbox_is_default = true;
Do we need to set m_prune_checkbox_is_default to true here? Wasn't it true already having entered into this block?
Yes, removed it
Title and description mismatch of the PR confuse me, I tested bitcoin-qt before and after the change and I don't see the difference in the behaviour (from the UI point of view, haven't checked the proper prunning).
I've ticked & unticked the prune checkbox and set a value, verifying the value is persisted in the config. Also combined the previous starting qt with -prune param set to 0, 1 and 600.
Perhaps I've some config that bypass this change? Could you please clarify? Sorry if I miss anything too obvius here.
-prune=2+disabled the checkbox
Looks like a bug in the master branch, as it should be like that:
$ ./src/bitcoind -prune=2
Error: Prune configured below the minimum of 550 MiB. Please use a higher number.
@ryanofsky Could you be interesting in reviewing of this PR?
Closing due to a long period of inactivity here. Feel free to reopen.
Reopening by request
Rebased
<!--2e250dc3d92b2c9115b66051148d6e47-->
🤔 There hasn't been much activity lately and the CI seems to be failing.
If no one reviewed the current pull request by commit hash, a rebase can be considered. While the CI failure may be a false positive, the CI hasn't been running for some time, so there may be a real issue hiding as well. A rebase triggers the latest CI and makes sure that no silent merge conflicts have snuck in.
ACK bee0ffbecf4f95b65f4084893924a1ab250ca77c, both commits are improvements of the current behaviour. Tested on Ubuntu 23.10.