File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -369,6 +369,8 @@ class Chain
369369 virtual bool overwriteRwSetting (const std::string& name, common::SettingsValue value, SettingsAction action = SettingsAction::WRITE) = 0;
370370
371371 // ! Delete a given setting in <datadir>/settings.json.
372+ // ! This method provides a simpler alternative to overwriteRwSetting when
373+ // ! erasing a setting, for ease of use and readability.
372374 virtual bool deleteRwSettings (const std::string& name, SettingsAction action = SettingsAction::WRITE) = 0;
373375
374376 // ! Synchronously send transactionAddedToMempool notifications about all
Original file line number Diff line number Diff line change @@ -841,10 +841,7 @@ class ChainImpl : public Chain
841841 }
842842 bool deleteRwSettings (const std::string& name, interfaces::SettingsAction action) override
843843 {
844- args ().LockSettings ([&](common::Settings& settings) {
845- settings.rw_settings .erase (name);
846- });
847- return action != interfaces::SettingsAction::WRITE || args ().WriteSettingsFile ();
844+ return overwriteRwSetting (name, {}, action);
848845 }
849846 void requestMempoolTransactions (Notifications& notifications) override
850847 {
You can’t perform that action at this time.
0 commit comments