Skip to content

Commit

Permalink
Bugfix: GUI/OptionsDialog: Disable policy options that require reject…
Browse files Browse the repository at this point in the history
…unknownscripts when the latter is disabled
  • Loading branch information
luke-jr committed Jun 19, 2024
1 parent 145aaa4 commit 3c8aef0
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/qt/optionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
dustdynamic_mempool_kvB->setValue(3024000);
CreateOptionUI(verticalLayout_Spamfiltering, dustdynamic_mempool_kvB, tr("the lowest fee of the best known %s kvB of unconfirmed transactions."), hlayout);

connect(dustdynamic_enable, &QAbstractButton::toggled, [this](const bool state){
const auto dustdynamic_enable_toggled = [this](const bool state){
dustdynamic_multiplier->setEnabled(state);
setSiblingsEnabled(dustdynamic_target_blocks, state);
setSiblingsEnabled(dustdynamic_mempool_kvB, state);
Expand All @@ -439,8 +439,9 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
dustdynamic_target_blocks->setEnabled(dustdynamic_target->isChecked());
dustdynamic_mempool_kvB->setEnabled(dustdynamic_mempool->isChecked());
}
});
dustdynamic_enable->toggled(dustdynamic_enable->isChecked());
};
connect(dustdynamic_enable, &QAbstractButton::toggled, dustdynamic_enable_toggled);
dustdynamic_enable_toggled(dustdynamic_enable->isChecked());
connect(dustdynamic_target, &QAbstractButton::toggled, [this](const bool state){
dustdynamic_target_blocks->setEnabled(state);
});
Expand All @@ -449,6 +450,18 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
});


connect(rejectunknownscripts, &QAbstractButton::toggled, [this, dustdynamic_enable_toggled](const bool state){
rejectbarepubkey->setEnabled(state);
rejectbaremultisig->setEnabled(state);
rejectparasites->setEnabled(state);
rejecttokens->setEnabled(state);
setSiblingsEnabled(dustrelayfee, state);
setSiblingsEnabled(maxscriptsize, state);
setSiblingsEnabled(dustdynamic_multiplier, state);
dustdynamic_enable_toggled(state && dustdynamic_enable->isChecked());
});


verticalLayout_Spamfiltering->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding));

/* Mining tab */
Expand Down

0 comments on commit 3c8aef0

Please sign in to comment.