Skip to content

Commit

Permalink
fix: persist coinjoin denoms and sessions options from gui over restarts
Browse files Browse the repository at this point in the history
  • Loading branch information
PastaPastaPasta committed Aug 14, 2024
1 parent 8f7dd9c commit 3ec0c8c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/qt/optionsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit 3ec0c8c

Please sign in to comment.