Bitcoin Core 31.99.0
P2P Digital Currency
args.h
Go to the documentation of this file.
1// Copyright (c) 2023-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_COMMON_ARGS_H
6#define BITCOIN_COMMON_ARGS_H
7
8#include <common/settings.h>
9#include <compat/compat.h>
10#include <sync.h>
11#include <util/chaintype.h>
12#include <util/fs.h>
13
14#include <concepts>
15#include <cstdint>
16#include <iosfwd>
17#include <list>
18#include <map>
19#include <optional>
20#include <set>
21#include <string>
22#include <string_view>
23#include <variant>
24#include <vector>
25
26class ArgsManager;
27
28extern const char * const BITCOIN_CONF_FILENAME;
29extern const char * const BITCOIN_SETTINGS_FILENAME;
30
31// Return true if -datadir option points to a valid directory or is not specified.
33
43fs::path AbsPathForConfigVal(const ArgsManager& args, const fs::path& path, bool net_specific = true);
44
45inline bool IsSwitchChar(char c)
46{
47#ifdef WIN32
48 return c == '-' || c == '/';
49#else
50 return c == '-';
51#endif
52}
53
54enum class OptionsCategory {
55 OPTIONS,
57 WALLET,
59 ZMQ,
64 RPC,
65 GUI,
69 IPC,
70
71 // Specific to one or more commands (OptionsCategory::COMMANDS)
72 // These are only included in help with their associated commands.
74
75 HIDDEN // Always the last option to avoid printing these in the help
76};
77
78struct KeyInfo {
79 std::string name;
80 std::string section;
81 bool negated{false};
82};
83
84KeyInfo InterpretKey(std::string key);
85
86std::optional<common::SettingsValue> InterpretValue(const KeyInfo& key, const std::string* value,
87 unsigned int flags, std::string& error);
88
90 std::string m_name;
91 std::string m_file;
92 int m_line;
93};
94
95std::string SettingToString(const common::SettingsValue&, const std::string&);
96std::optional<std::string> SettingToString(const common::SettingsValue&);
97
98template <std::integral Int>
99Int SettingTo(const common::SettingsValue&, Int);
100
101template <std::integral Int>
102std::optional<Int> SettingTo(const common::SettingsValue&);
103
104bool SettingToBool(const common::SettingsValue&, bool);
105std::optional<bool> SettingToBool(const common::SettingsValue&);
106
108{
109public:
114 enum Flags : uint32_t {
115 ALLOW_ANY = 0x01,
116 // ALLOW_BOOL = 0x02, //!< unimplemented, draft implementation in #16545
117 // ALLOW_INT = 0x04, //!< unimplemented, draft implementation in #16545
118 // ALLOW_STRING = 0x08, //!< unimplemented, draft implementation in #16545
119 // ALLOW_LIST = 0x10, //!< unimplemented, draft implementation in #16545
122
123 DEBUG_ONLY = 0x100,
124 /* Some options would cause cross-contamination if values for
125 * mainnet were used while running on regtest/testnet (or vice-versa).
126 * Setting them as NETWORK_ONLY ensures that sharing a config file
127 * between mainnet and regtest/testnet won't cause problems due to these
128 * parameters by accident. */
130 // This argument's value is sensitive (such as a password).
131 SENSITIVE = 0x400,
132 COMMAND = 0x800,
133 };
134
135private:
136 struct Arg
137 {
138 std::string m_help_param;
139 std::string m_help_text;
140 unsigned int m_flags;
141 };
142
143 mutable Mutex cs_args;
145 std::vector<std::string> m_command GUARDED_BY(cs_args);
146 std::string m_network GUARDED_BY(cs_args);
147 std::set<std::string> m_network_only_args GUARDED_BY(cs_args);
148 std::map<OptionsCategory, std::map<std::string, Arg>> m_available_args GUARDED_BY(cs_args);
149 std::optional<unsigned int> m_default_flags GUARDED_BY(cs_args){};
150 std::map<std::string, std::set<std::string>> m_command_args GUARDED_BY(cs_args);
151 bool m_accept_any_command GUARDED_BY(cs_args){true};
152 std::list<SectionInfo> m_config_sections GUARDED_BY(cs_args);
153 std::optional<fs::path> m_config_path GUARDED_BY(cs_args);
154 mutable fs::path m_cached_blocks_path GUARDED_BY(cs_args);
155 mutable fs::path m_cached_datadir_path GUARDED_BY(cs_args);
156 mutable fs::path m_cached_network_datadir_path GUARDED_BY(cs_args);
157
163 bool UseDefaultSection(const std::string& arg) const EXCLUSIVE_LOCKS_REQUIRED(cs_args);
164
165protected:
166 [[nodiscard]] bool ReadConfigStream(std::istream& stream, const std::string& filepath, std::string& error, bool ignore_invalid_keys = false) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
167 [[nodiscard]] bool ReadConfigString(const std::string& str_config) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
168
169public:
178
182 std::vector<common::SettingsValue> GetSettingsList(const std::string& arg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
183
186
190 void SelectConfigNetwork(const std::string& network) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
191
192 [[nodiscard]] bool ParseParameters(int argc, const char* const argv[], std::string& error) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
193
199 [[nodiscard]] bool ReadConfigFiles(std::string& error, bool ignore_invalid_keys = false) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
200
208
213
214 struct Command {
216 std::string command;
221 std::vector<std::string> args;
222 };
226 std::optional<const Command> GetCommand() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
227
236 bool CheckCommandOptions(const std::string& command, std::vector<std::string>* errors = nullptr) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
237
244
251
258
263
270 std::vector<std::string> GetArgs(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
271
278 bool IsArgSet(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
279
287 bool IsArgNegated(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
288
296 std::string GetArg(const std::string& strArg, const std::string& strDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
297 std::optional<std::string> GetArg(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
298
309 fs::path GetPathArg(std::string arg, const fs::path& default_value = {}) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
310
318 template <std::integral Int>
319 Int GetArg(const std::string& strArg, Int nDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
320
321 template <std::integral Int>
322 std::optional<Int> GetArg(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
323
324 int64_t GetIntArg(const std::string& strArg, int64_t nDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) { return GetArg<int64_t>(strArg, nDefault); }
325 std::optional<int64_t> GetIntArg(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) { return GetArg<int64_t>(strArg); }
326
334 bool GetBoolArg(const std::string& strArg, bool fDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
335 std::optional<bool> GetBoolArg(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
336
344 bool SoftSetArg(const std::string& strArg, const std::string& strValue) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
345
353 bool SoftSetBoolArg(const std::string& strArg, bool fValue) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
354
355 // Forces an arg setting. Called by SoftSetArg() if the arg hasn't already
356 // been set. Also called directly in testing.
357 void ForceSetArg(const std::string& strArg, const std::string& strValue) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
358
365
372
376 void AddArg(const std::string& name, const std::string& help, unsigned int flags, const OptionsCategory& cat) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
377
381 void AddCommand(const std::string& cmd, const std::string& help, std::set<std::string> options = {}) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
382
386 void AddHiddenArgs(const std::vector<std::string>& args) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
387
392
399
404
409 std::optional<unsigned int> GetArgFlags(const std::string& name) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
410
414 void SetDefaultFlags(std::optional<unsigned int>) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
415
420 bool GetSettingsPath(fs::path* filepath = nullptr, bool temp = false, bool backup = false) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
421
425 bool ReadSettingsFile(std::vector<std::string>* errors = nullptr) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
426
431 bool WriteSettingsFile(std::vector<std::string>* errors = nullptr, bool backup = false) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
432
438
442 template <typename Fn>
444 {
445 LOCK(cs_args);
446 fn(m_settings);
447 }
448
454
455private:
456 // Internal helpers, for use by callers that already hold `cs_args`.
458 std::optional<unsigned int> GetArgFlags_(const std::string& name) const EXCLUSIVE_LOCKS_REQUIRED(cs_args);
459 fs::path GetPathArg_(std::string arg, const fs::path& default_value = {}) const EXCLUSIVE_LOCKS_REQUIRED(cs_args);
460
467 fs::path GetDataDir(bool net_specific) const EXCLUSIVE_LOCKS_REQUIRED(cs_args);
468
475 std::variant<ChainType, std::string> GetChainArg() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
476
477 // Helper function for LogArgs().
478 void logArgsPrefix(
479 const std::string& prefix,
480 const std::string& section,
481 const std::map<std::string, std::vector<common::SettingsValue>>& args) const EXCLUSIVE_LOCKS_REQUIRED(cs_args);
482};
483
484extern ArgsManager gArgs;
485
489bool HelpRequested(const ArgsManager& args);
490
493
494extern const std::vector<std::string> TEST_OPTIONS_DOC;
495
497bool HasTestOption(const ArgsManager& args, const std::string& test_option);
498
505std::string HelpMessageGroup(const std::string& message);
506
516std::string HelpMessageOpt(std::string_view option, std::string_view help_param, std::string_view message, bool subopt = false);
517
518#endif // BITCOIN_COMMON_ARGS_H
const std::vector< std::string > TEST_OPTIONS_DOC
Definition: args.cpp:839
bool HelpRequested(const ArgsManager &args)
Definition: args.cpp:806
void SetupHelpOptions(ArgsManager &args)
Add help options to the args manager.
Definition: args.cpp:811
std::string SettingToString(const common::SettingsValue &, const std::string &)
Definition: args.cpp:539
std::string HelpMessageOpt(std::string_view option, std::string_view help_param, std::string_view message, bool subopt=false)
Format a string to be used as option description in help messages.
Definition: args.cpp:821
bool SettingToBool(const common::SettingsValue &, bool)
Definition: args.cpp:591
std::optional< common::SettingsValue > InterpretValue(const KeyInfo &key, const std::string *value, unsigned int flags, std::string &error)
Interpret settings value based on registered flags.
Definition: args.cpp:105
OptionsCategory
Definition: args.h:54
const char *const BITCOIN_SETTINGS_FILENAME
Definition: args.cpp:38
bool CheckDataDirOption(const ArgsManager &args)
Definition: args.cpp:885
fs::path AbsPathForConfigVal(const ArgsManager &args, const fs::path &path, bool net_specific=true)
Most paths passed as configuration arguments are treated as relative to the datadir if they are not a...
Definition: config.cpp:240
Int SettingTo(const common::SettingsValue &, Int)
Definition: args.cpp:568
ArgsManager gArgs
Definition: args.cpp:40
bool HasTestOption(const ArgsManager &args, const std::string &test_option)
Checks if a particular test option is present in -test command-line arg options.
Definition: args.cpp:845
std::string HelpMessageGroup(const std::string &message)
Format a string to be used as group of options in help messages.
Definition: args.cpp:817
KeyInfo InterpretKey(std::string key)
Parse "name", "section.name", "noname", "section.noname" settings keys.
Definition: args.cpp:77
const char *const BITCOIN_CONF_FILENAME
Definition: args.cpp:37
bool IsSwitchChar(char c)
Definition: args.h:45
int flags
Definition: bitcoin-tx.cpp:530
const auto cmd
const auto command
ArgsManager & args
Definition: bitcoind.cpp:280
ChainType
Definition: chaintype.h:12
bool ParseParameters(int argc, const char *const argv[], std::string &error) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: args.cpp:177
std::vector< common::SettingsValue > GetSettingsList(const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get list of setting values.
Definition: args.cpp:970
std::vector< std::string > GetArgs(const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return a vector of strings of the given argument.
Definition: args.cpp:424
std::optional< unsigned int > m_default_flags GUARDED_BY(cs_args)
Definition: args.h:149
ChainType GetChainType() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Returns the appropriate chain type from the program arguments.
Definition: args.cpp:904
std::map< OptionsCategory, std::map< std::string, Arg > > m_available_args GUARDED_BY(cs_args)
void CheckMultipleCLIArgs() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Check CLI command args.
Definition: args.cpp:697
Flags
Flags controlling how config and command line arguments are validated and interpreted.
Definition: args.h:114
@ NETWORK_ONLY
Definition: args.h:129
@ ALLOW_ANY
disable validation
Definition: args.h:115
@ DISALLOW_NEGATION
disallow -nofoo syntax
Definition: args.h:120
@ DISALLOW_ELISION
disallow -foo syntax that doesn't assign any value
Definition: args.h:121
@ DEBUG_ONLY
Definition: args.h:123
@ COMMAND
Definition: args.h:132
@ SENSITIVE
Definition: args.h:131
std::list< SectionInfo > GetUnrecognizedSections() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Log warnings for unrecognized section names in the config file.
Definition: args.cpp:154
common::SettingsValue GetSetting(const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get setting value.
Definition: args.cpp:964
bool GetSettingsPath(fs::path *filepath=nullptr, bool temp=false, bool backup=false) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get settings file path, or return false if read-write settings were disabled with -nosettings.
Definition: args.cpp:438
bool ReadConfigString(const std::string &str_config) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: config.cpp:123
bool CheckCommandOptions(const std::string &command, std::vector< std::string > *errors=nullptr) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Check that any command-specific options the user specified are valid for the given command.
Definition: args.cpp:390
fs::path GetBlocksDirPath() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get blocks directory path.
Definition: args.cpp:300
fs::path m_cached_datadir_path GUARDED_BY(cs_args)
fs::path GetDataDirBase() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get data directory path.
Definition: args.cpp:325
fs::path GetConfigFilePath() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return config file path (read-only)
Definition: args.cpp:891
void SetDefaultFlags(std::optional< unsigned int >) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Set default flags to return for an unknown arg.
Definition: args.cpp:276
void AddCommand(const std::string &cmd, const std::string &help, std::set< std::string > options={}) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Add command.
Definition: args.cpp:635
bool SoftSetArg(const std::string &strArg, const std::string &strValue) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Set an argument if it doesn't already have a value.
Definition: args.cpp:613
std::set< std::string > GetUnsuitableSectionOnlyArgs() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Log warnings for options in m_section_only_args when they are specified in the default section but no...
Definition: args.cpp:134
std::optional< fs::path > m_config_path GUARDED_BY(cs_args)
void AddArg(const std::string &name, const std::string &help, unsigned int flags, const OptionsCategory &cat) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Add argument.
Definition: args.cpp:659
bool WriteSettingsFile(std::vector< std::string > *errors=nullptr, bool backup=false) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Write settings file or backup settings file.
Definition: args.cpp:487
fs::path GetPathArg_(std::string arg, const fs::path &default_value={}) const EXCLUSIVE_LOCKS_REQUIRED(cs_args)
Definition: args.cpp:282
std::optional< int64_t > GetIntArg(const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: args.h:325
void LockSettings(Fn &&fn) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Access settings with lock held.
Definition: args.h:443
bool ReadConfigFiles(std::string &error, bool ignore_invalid_keys=false) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: config.cpp:135
std::list< SectionInfo > m_config_sections GUARDED_BY(cs_args)
std::string m_network GUARDED_BY(cs_args)
void ClearPathCache() EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Clear cached directory paths.
Definition: args.cpp:361
fs::path GetDataDir(bool net_specific) const EXCLUSIVE_LOCKS_REQUIRED(cs_args)
Get data directory path.
Definition: args.cpp:335
fs::path m_cached_blocks_path GUARDED_BY(cs_args)
void SetConfigFilePath(fs::path) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: args.cpp:897
std::set< std::string > m_network_only_args GUARDED_BY(cs_args)
common::SettingsValue GetPersistentSetting(const std::string &name) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get current setting from config file or read/write settings file, ignoring nonpersistent command line...
Definition: args.cpp:507
std::map< std::string, std::set< std::string > > m_command_args GUARDED_BY(cs_args)
void ForceSetArg(const std::string &strArg, const std::string &strValue) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: args.cpp:629
fs::path GetPathArg(std::string arg, const fs::path &default_value={}) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return path argument or default value.
Definition: args.cpp:294
std::vector< std::string > m_command GUARDED_BY(cs_args)
void LogArgs() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Log the config file options and the command line arguments, useful for troubleshooting.
Definition: args.cpp:994
std::string GetArg(const std::string &strArg, const std::string &strDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return string argument or default value.
Definition: args.cpp:519
void AddHiddenArgs(const std::vector< std::string > &args) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Add many hidden arguments.
Definition: args.cpp:680
std::variant< ChainType, std::string > GetChainArg() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return -regtest/-signet/-testnet/-testnet4/-chain= setting as a ChainType enum if a recognized chain ...
Definition: args.cpp:918
common::Settings m_settings GUARDED_BY(cs_args)
void logArgsPrefix(const std::string &prefix, const std::string &section, const std::map< std::string, std::vector< common::SettingsValue > > &args) const EXCLUSIVE_LOCKS_REQUIRED(cs_args)
Definition: args.cpp:976
std::string GetChainTypeString() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Returns the appropriate chain type string from the program arguments.
Definition: args.cpp:911
bool ReadSettingsFile(std::vector< std::string > *errors=nullptr) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Read settings file.
Definition: args.cpp:464
void ClearArgs() EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Clear available arguments.
Definition: args.cpp:687
bool IsArgSet(const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return true if the given argument has been manually set.
Definition: args.cpp:433
Mutex cs_args
Definition: args.h:143
std::optional< const Command > GetCommand() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get the command and command args (returns std::nullopt if no command provided)
Definition: args.cpp:370
bool SoftSetBoolArg(const std::string &strArg, bool fValue) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Set a boolean argument if it doesn't already have a value.
Definition: args.cpp:621
fs::path GetDataDirNet() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get data directory path with appended network identifier.
Definition: args.cpp:330
bool IsArgNegated(const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return true if the argument was originally passed as a negated option, i.e.
Definition: args.cpp:514
common::SettingsValue GetSetting_(const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(cs_args)
Definition: args.cpp:956
bool ReadConfigStream(std::istream &stream, const std::string &filepath, std::string &error, bool ignore_invalid_keys=false) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: config.cpp:94
std::optional< unsigned int > GetArgFlags(const std::string &name) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return Flags for known arg.
Definition: args.cpp:270
std::optional< unsigned int > GetArgFlags_(const std::string &name) const EXCLUSIVE_LOCKS_REQUIRED(cs_args)
Definition: args.cpp:258
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: args.h:324
bool m_accept_any_command GUARDED_BY(cs_args)
Definition: args.h:151
fs::path m_cached_network_datadir_path GUARDED_BY(cs_args)
bool UseDefaultSection(const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(cs_args)
Returns true if settings values from the default section should be used, depending on the current net...
Definition: args.cpp:950
bool GetBoolArg(const std::string &strArg, bool fDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return boolean argument or default value.
Definition: args.cpp:573
void SelectConfigNetwork(const std::string &network) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Select the network in use.
Definition: args.cpp:171
std::string GetHelpMessage() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get the help string.
Definition: args.cpp:714
Definition: init.cpp:17
UniValue SettingsValue
Settings value type (string/integer/boolean/null variant).
Definition: settings.h:28
Definition: common.h:30
CRPCCommand m_command
Definition: interfaces.cpp:554
const char * prefix
Definition: rest.cpp:1142
const char * name
Definition: rest.cpp:49
static RPCMethod help()
Definition: server.cpp:119
std::string m_help_param
Definition: args.h:138
unsigned int m_flags
Definition: args.h:140
std::string m_help_text
Definition: args.h:139
std::vector< std::string > args
If command is non-empty: Any args that followed it If command is empty: The unregistered command and ...
Definition: args.h:221
std::string command
The command (if one has been registered with AddCommand), or empty.
Definition: args.h:216
Definition: args.h:78
std::string name
Definition: args.h:79
bool negated
Definition: args.h:81
std::string section
Definition: args.h:80
int m_line
Definition: args.h:92
std::string m_file
Definition: args.h:91
std::string m_name
Definition: args.h:90
Stored settings.
Definition: settings.h:32
#define LOCK(cs)
Definition: sync.h:268
#define EXCLUSIVE_LOCKS_REQUIRED(...)
Definition: threadsafety.h:49