fix: persist coinjoin denoms and sessions options from gui over restarts

This commit is contained in:
pasta 2024-08-13 11:07:50 +07:00
parent 8f7dd9c6d2
commit 3ec0c8ca0a
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -224,6 +224,8 @@ void OptionsModel::Init(bool resetSettings)
// CoinJoin
if (!settings.contains("nCoinJoinSessions"))
settings.setValue("nCoinJoinSessions", DEFAULT_COINJOIN_SESSIONS);
if (!gArgs.SoftSetArg("-coinjoinsessions", settings.value("nCoinJoinSessions").toString().toStdString()))
addOverriddenOption("-coinjoinsessions");
if (!settings.contains("nCoinJoinRounds"))
settings.setValue("nCoinJoinRounds", DEFAULT_COINJOIN_ROUNDS);
@ -247,9 +249,13 @@ void OptionsModel::Init(bool resetSettings)
if (!settings.contains("nCoinJoinDenomsGoal"))
settings.setValue("nCoinJoinDenomsGoal", DEFAULT_COINJOIN_DENOMS_GOAL);
if (!gArgs.SoftSetArg("-coinjoindenomsgoal", settings.value("nCoinJoinDenomsGoal").toString().toStdString()))
addOverriddenOption("-coinjoindenomsgoal");
if (!settings.contains("nCoinJoinDenomsHardCap"))
settings.setValue("nCoinJoinDenomsHardCap", DEFAULT_COINJOIN_DENOMS_HARDCAP);
if (!gArgs.SoftSetArg("-coinjoindenomshardcap", settings.value("nCoinJoinDenomsHardCap").toString().toStdString()))
addOverriddenOption("-coinjoindenomshardcap");
#endif
// Network