aboutsummaryrefslogtreecommitdiff
path: root/src/util/settings.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-04-28 19:08:26 -0400
committerRussell Yanofsky <russ@yanofsky.org>2020-07-11 05:41:12 -0400
commiteb682c5700e7a9176d0104d470b83ff9aa3589e8 (patch)
treeb93a21cb97ffaa978e4fd3903cc481be65cf7017 /src/util/settings.h
parenta42631775afadf7e8cf07e917f733bd54dc3080e (diff)
util: Add ReadSettings and WriteSettings functions
Currently unused, but includes tests.
Diffstat (limited to 'src/util/settings.h')
-rw-r--r--src/util/settings.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/settings.h b/src/util/settings.h
index 1d03639fa2..ee160e1ac8 100644
--- a/src/util/settings.h
+++ b/src/util/settings.h
@@ -5,6 +5,8 @@
#ifndef BITCOIN_UTIL_SETTINGS_H
#define BITCOIN_UTIL_SETTINGS_H
+#include <fs.h>
+
#include <map>
#include <string>
#include <vector>
@@ -35,6 +37,16 @@ struct Settings {
std::map<std::string, std::map<std::string, std::vector<SettingsValue>>> ro_config;
};
+//! Read settings file.
+bool ReadSettings(const fs::path& path,
+ std::map<std::string, SettingsValue>& values,
+ std::vector<std::string>& errors);
+
+//! Write settings file.
+bool WriteSettings(const fs::path& path,
+ const std::map<std::string, SettingsValue>& values,
+ std::vector<std::string>& errors);
+
//! Get settings value from combined sources: forced settings, command line
//! arguments and the read-only config file.
//!