From a4e6b8a9930f34fe1f5fc5ec759dacb8a486f9c3 Mon Sep 17 00:00:00 2001 From: pasta Date: Sun, 18 Aug 2024 09:27:49 +0700 Subject: [PATCH] Merge #6208: fix: persist coinjoin denoms options from gui over restarts 3ec0c8ca0a34cf35df4f4431bc282f0b99618d8a 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 3ec0c8ca0a34cf35df4f4431bc282f0b99618d8a UdjinM6: utACK 3ec0c8ca0a34cf35df4f4431bc282f0b99618d8a Tree-SHA512: b7378460b3990713b755f36de506b94e7d0005f19cf1155f2fc12191ba03f2e16c35049ddbd89f578acd89bc8eae5e432913114e1ff5ef7ab2cc30628aeff3f2 --- src/qt/optionsmodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 912e8d5dd8..416a122317 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -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