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
369
369
virtual bool overwriteRwSetting (const std::string& name, common::SettingsValue value, SettingsAction action = SettingsAction::WRITE) = 0;
370
370
371
371
// ! 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.
372
374
virtual bool deleteRwSettings (const std::string& name, SettingsAction action = SettingsAction::WRITE) = 0;
373
375
374
376
// ! Synchronously send transactionAddedToMempool notifications about all
Original file line number Diff line number Diff line change @@ -841,10 +841,7 @@ class ChainImpl : public Chain
841
841
}
842
842
bool deleteRwSettings (const std::string& name, interfaces::SettingsAction action) override
843
843
{
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);
848
845
}
849
846
void requestMempoolTransactions (Notifications& notifications) override
850
847
{
You can’t perform that action at this time.
0 commit comments