mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 17:54:19 +02:00
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.
This commit is contained in:
@@ -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:
|
||||
@@ -448,6 +452,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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user