Merge #6208: fix: persist coinjoin denoms options from gui over restarts

3ec0c8ca0a fix: persist coinjoin denoms and sessions options from gui over restarts (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  Persist coinjoin denoms over restarts, fixes #5975

  ## What was done?
  Soft set the argument into the daemon from GUI settings

  ## How Has This Been Tested?
  follow procedure in 5975

  ## Breaking Changes

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  knst:
    utACK 3ec0c8ca0a
  UdjinM6:
    utACK 3ec0c8ca0a

Tree-SHA512: b7378460b3990713b755f36de506b94e7d0005f19cf1155f2fc12191ba03f2e16c35049ddbd89f578acd89bc8eae5e432913114e1ff5ef7ab2cc30628aeff3f2
This commit is contained in:
pasta 2024-08-18 09:27:49 +07:00
commit d8fca38404
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