Skip to content

Commit

Permalink
chain: dont check for null settings value in overwriteRwSetting
Browse files Browse the repository at this point in the history
- Deleting the settings when the new value is null is redundant
  as we can achieve the same by just calling `deleteRwSetting`.

- This commit updates `overwriteRwSetting` to instead not check
  for null settings and just go ahead and update the settings with
  whatever was passed.
  • Loading branch information
ismaelsadeeq committed Sep 8, 2024
1 parent 96bd614 commit 29a83ca
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/node/interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,6 @@ class ChainImpl : public Chain
}
bool overwriteRwSetting(const std::string& name, common::SettingsValue value, interfaces::SettingsAction action) override
{
if (value.isNull()) return deleteRwSettings(name, action);
return updateRwSetting(name, [&](common::SettingsValue& settings) {
settings = std::move(value);
return action;
Expand Down

0 comments on commit 29a83ca

Please sign in to comment.