diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2019-04-28 19:08:26 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-07-11 05:41:12 -0400 |
commit | 9c69cfe4c54e38edd2f54303be2f8a53dcf5bad8 (patch) | |
tree | 3480cdc4b02a6c893b0f756b8a31319351dc6b2c /src/util/settings.h | |
parent | eb682c5700e7a9176d0104d470b83ff9aa3589e8 (diff) |
Add <datadir>/settings.json persistent settings storage.
Persistent settings are used in followup PRs #15936 to unify gui settings
between bitcoin-qt and bitcoind, and #15937 to add a load_on_startup flag to
the loadwallet RPC and maintain a dynamic list of wallets that should be loaded
on startup that also can be shared between bitcoind and bitcoin-qt.
Diffstat (limited to 'src/util/settings.h')
-rw-r--r-- | src/util/settings.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/settings.h b/src/util/settings.h index ee160e1ac8..ed36349232 100644 --- a/src/util/settings.h +++ b/src/util/settings.h @@ -26,13 +26,15 @@ namespace util { //! https://github.com/bitcoin/bitcoin/pull/15934/files#r337691812) using SettingsValue = UniValue; -//! Stored bitcoin settings. This struct combines settings from the command line -//! and a read-only configuration file. +//! Stored settings. This struct combines settings from the command line, a +//! read-only configuration file, and a read-write runtime settings file. struct Settings { //! Map of setting name to forced setting value. std::map<std::string, SettingsValue> forced_settings; //! Map of setting name to list of command line values. std::map<std::string, std::vector<SettingsValue>> command_line_options; + //! Map of setting name to read-write file setting value. + std::map<std::string, SettingsValue> rw_settings; //! Map of config section name and setting name to list of config file values. std::map<std::string, std::map<std::string, std::vector<SettingsValue>>> ro_config; }; @@ -48,7 +50,7 @@ bool WriteSettings(const fs::path& path, std::vector<std::string>& errors); //! Get settings value from combined sources: forced settings, command line -//! arguments and the read-only config file. +//! arguments, runtime read-write settings, and the read-only config file. //! //! @param ignore_default_section_config - ignore values in the default section //! of the config file (part before any |