diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2019-04-29 15:29:00 -0400 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2022-05-19 11:32:56 -0400 |
commit | 0e55bc6e7fe439404dc56093a0949395dae51e6b (patch) | |
tree | 5f76e812d3c8c202d07f1b5b6b9dc1a0ab980298 /src/util/system.h | |
parent | 0de36941eca1bff91420dd878eb097db2b1a596c (diff) | |
download | bitcoin-0e55bc6e7fe439404dc56093a0949395dae51e6b.tar.xz |
settings: Add update/getPersistent/isIgnored methods
Add interfaces::Node methods to give GUI finer grained control over
settings.json file. Update method is used to write settings to the file,
getPersistent and isIgnored methods are used to find out about settings
file and command line option interactions.
Diffstat (limited to 'src/util/system.h')
-rw-r--r-- | src/util/system.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/system.h b/src/util/system.h index a7f4d16911..bfc9698221 100644 --- a/src/util/system.h +++ b/src/util/system.h @@ -161,6 +161,10 @@ struct SectionInfo int m_line; }; +std::string SettingToString(const util::SettingsValue&, const std::string&); +int64_t SettingToInt(const util::SettingsValue&, int64_t); +bool SettingToBool(const util::SettingsValue&, bool); + class ArgsManager { public: @@ -449,6 +453,12 @@ protected: bool WriteSettingsFile(std::vector<std::string>* errors = nullptr) const; /** + * Get current setting from config file or read/write settings file, + * ignoring nonpersistent command line or forced settings values. + */ + util::SettingsValue GetPersistentSetting(const std::string& name) const; + + /** * Access settings with lock held. */ template <typename Fn> |