aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2022-05-16 14:37:00 -0400
committerRyan Ofsky <ryan@ofsky.org>2022-05-19 11:32:56 -0400
commitf9fdcec7e932843a91ddf7f377e00bd2a6efb82a (patch)
tree445d6149d3336842aa63ee000d64854e834b54a4 /src/interfaces
parent77fabffef4ea840ee15c97061048fe8443d74658 (diff)
downloadbitcoin-f9fdcec7e932843a91ddf7f377e00bd2a6efb82a.tar.xz
settings: Add resetSettings() method
Allows the GUI to clear settings.json file and save settings.json.bak file when GUI "Reset Options" button is pressed or -resetguisettings command line option is used. (GUI code already backs up and resets the "guisettings.ini" file this way, so this just makes the same behavior possible for "settings.json")
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/node.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/node.h b/src/interfaces/node.h
index 1585174a6f..2c31e12ada 100644
--- a/src/interfaces/node.h
+++ b/src/interfaces/node.h
@@ -112,6 +112,10 @@ public:
//! source, but not being persisted.
virtual void forceSetting(const std::string& name, const util::SettingsValue& value) = 0;
+ //! Clear all settings in <datadir>/settings.json and store a backup of
+ //! previous settings in <datadir>/settings.json.bak.
+ virtual void resetSettings() = 0;
+
//! Map port.
virtual void mapPort(bool use_upnp, bool use_natpmp) = 0;