diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui index ee3632e12c..96ccfeca67 100644 --- a/src/qt/forms/optionsdialog.ui +++ b/src/qt/forms/optionsdialog.ui @@ -320,6 +320,13 @@ + + + + Enable Locally Specified Sidestaking + + + diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 697c489eaf..16a5388af6 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -176,6 +176,7 @@ void OptionsDialog::setMapper() mapper->addMapping(ui->enableStakeSplit, OptionsModel::EnableStakeSplit); mapper->addMapping(ui->stakingEfficiency, OptionsModel::StakingEfficiency); mapper->addMapping(ui->minPostSplitOutputValue, OptionsModel::MinStakeSplitValue); + mapper->addMapping(ui->enableSideStaking, OptionsModel::EnableSideStaking); /* Window */ mapper->addMapping(ui->disableTransactionNotifications, OptionsModel::DisableTrxNotifications); diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index f435c2369f..bca2f1013d 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -152,6 +152,9 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const case EnableStakeSplit: // This comes from the core and is a read-write setting (see below). return QVariant(gArgs.GetBoolArg("-enablestakesplit")); + case EnableSideStaking: + // This comes from the core and is a read-write setting (see below). + return QVariant(gArgs.GetBoolArg("-enablesidestaking")); case StakingEfficiency: // This comes from the core and is a read-write setting (see below). return QVariant((double) gArgs.GetArg("-stakingefficiency", (int64_t) 90)); @@ -303,10 +306,15 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in case EnableStakeSplit: // This is a core setting stored in the read-write settings file and once set will override the read-only //config file. - //fStakeSplitEnabled = value.toBool(); gArgs.ForceSetArg("-enablestakesplit", value.toBool() ? "1" : "0"); updateRwSetting("enablestakesplit", gArgs.GetBoolArg("-enablestakesplit")); break; + case EnableSideStaking: + // This is a core setting stored in the read-write settings file and once set will override the read-only + //config file. + gArgs.ForceSetArg("-enablesidestaking", value.toBool() ? "1" : "0"); + updateRwSetting("enablesidestaking", gArgs.GetBoolArg("-enablesidestaking")); + break; case StakingEfficiency: // This is a core setting stored in the read-write settings file and once set will override the read-only //config file. diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h index f9d94bc834..cfb6a9180c 100644 --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -41,6 +41,7 @@ class OptionsModel : public QAbstractListModel DataDir, // QString EnableStaking, // bool EnableStakeSplit, // bool + EnableSideStaking, // bool StakingEfficiency, // double MinStakeSplitValue, // int ContractChangeToInput, // bool