aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2023-09-26 13:52:35 -0400
committerRyan Ofsky <ryan@ofsky.org>2023-10-20 10:30:16 -0400
commit8062c3bdb9dd3062597ed8299e99151b612d32b7 (patch)
tree7d4fae14d2e3e300b9445468103dbff96b06b086 /src
parent441d00c60f0a67889d23f8556190ff99dde488bc (diff)
util: Add ArgsManager SetConfigFilePath method
Needed by multiprocess support code to pass parsed configuration to a spawned process.
Diffstat (limited to 'src')
-rw-r--r--src/common/args.cpp7
-rw-r--r--src/common/args.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/common/args.cpp b/src/common/args.cpp
index ca04175696..cfaa4de72d 100644
--- a/src/common/args.cpp
+++ b/src/common/args.cpp
@@ -720,6 +720,13 @@ fs::path ArgsManager::GetConfigFilePath() const
return *Assert(m_config_path);
}
+void ArgsManager::SetConfigFilePath(fs::path path)
+{
+ LOCK(cs_args);
+ assert(!m_config_path);
+ m_config_path = path;
+}
+
ChainType ArgsManager::GetChainType() const
{
std::variant<ChainType, std::string> arg = GetChainArg();
diff --git a/src/common/args.h b/src/common/args.h
index ae3ed02bc7..1c5db718f4 100644
--- a/src/common/args.h
+++ b/src/common/args.h
@@ -180,6 +180,7 @@ protected:
* Return config file path (read-only)
*/
fs::path GetConfigFilePath() const;
+ void SetConfigFilePath(fs::path);
[[nodiscard]] bool ReadConfigFiles(std::string& error, bool ignore_invalid_keys = false);
/**