File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,9 @@ class Chain
363363 virtual bool updateRwSetting (const std::string& name, const SettingsUpdate& update_function) = 0;
364364
365365 // ! Replace a setting in <datadir>/settings.json with a new value.
366+ // ! Null can be passed to erase the setting.
367+ // ! This method provides a simpler alternative to updateRwSetting when
368+ // ! atomically reading and updating the setting is not required.
366369 virtual bool overwriteRwSetting (const std::string& name, common::SettingsValue value, SettingsAction action = SettingsAction::WRITE) = 0;
367370
368371 // ! Delete a given setting in <datadir>/settings.json.
Original file line number Diff line number Diff line change @@ -834,7 +834,6 @@ class ChainImpl : public Chain
834834 }
835835 bool overwriteRwSetting (const std::string& name, common::SettingsValue value, interfaces::SettingsAction action) override
836836 {
837- if (value.isNull ()) return deleteRwSettings (name, action);
838837 return updateRwSetting (name, [&](common::SettingsValue& settings) {
839838 settings = std::move (value);
840839 return action;
You can’t perform that action at this time.
0 commit comments