mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 13:02:38 +02:00
GUI/Options: Disable peerblockfilters option if pruning is already enabled but basic blockfilterindex is not
Otherwise, enabling it will prompt the user to restart, and restart will fail
This commit is contained in:
parent
c089a0d22f
commit
db8eba71d5
@ -14,6 +14,7 @@
|
||||
#include <qt/optionsmodel.h>
|
||||
|
||||
#include <common/system.h>
|
||||
#include <index/blockfilterindex.h>
|
||||
#include <interfaces/node.h>
|
||||
#include <node/chainstatemanager_args.h>
|
||||
#include <netbase.h>
|
||||
@ -363,6 +364,13 @@ void OptionsDialog::setMapper()
|
||||
|
||||
mapper->addMapping(ui->peerbloomfilters, OptionsModel::peerbloomfilters);
|
||||
mapper->addMapping(ui->peerblockfilters, OptionsModel::peerblockfilters);
|
||||
if (prune_checkstate != Qt::Unchecked && !GetBlockFilterIndex(BlockFilterType::BASIC)) {
|
||||
// Once pruning begins, it's too late to enable block filters, and doing so will prevent starting the client
|
||||
// Rather than try to monitor sync state, just disable the option once pruning is enabled
|
||||
// Advanced users can override this manually anyway
|
||||
ui->peerblockfilters->setEnabled(false);
|
||||
ui->peerblockfilters->setToolTip(ui->peerblockfilters->toolTip() + " " + tr("(only available if enabled at least once before turning on pruning)"));
|
||||
}
|
||||
|
||||
/* Window */
|
||||
#ifndef Q_OS_MACOS
|
||||
|
Loading…
Reference in New Issue
Block a user