diff --git a/src/common/args.cpp b/src/common/args.cpp index ca04175696a..cfaa4de72d3 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 arg = GetChainArg(); diff --git a/src/common/args.h b/src/common/args.h index ae3ed02bc7d..1c5db718f4d 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); /**