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 <sync.h>
10#include <util/chaintype.h>
11#include <util/fs.h>
12
13#include <concepts>
14#include <cstdint>
15#include <iosfwd>
16#include <list>
17#include <map>
18#include <optional>
19#include <set>
20#include <string>
21#include <string_view>
22#include <variant>
23#include <vector>
24
25class ArgsManager;
26
27extern const char * const BITCOIN_CONF_FILENAME;
28extern const char * const BITCOIN_SETTINGS_FILENAME;
29
30// Return true if -datadir option points to a valid directory or is not specified.
32
42fs::path AbsPathForConfigVal(const ArgsManager& args, const fs::path& path, bool net_specific = true);
43
44inline bool IsSwitchChar(char c)
45{
46#ifdef WIN32
47 return c == '-' || c == '/';
48#else
49 return c == '-';
50#endif
51}
52
53enum class OptionsCategory {
54 OPTIONS,
56 WALLET,
58 ZMQ,
63 RPC,
64 GUI,
68 IPC,
69
70 // Specific to one or more commands (OptionsCategory::COMMANDS)
71 // These are only included in help with their associated commands.
73
74 HIDDEN // Always the last option to avoid printing these in the help
75};
76
77struct KeyInfo {
78 std::string name;
79 std::string section;
80 bool negated{false};
81};
82
83KeyInfo InterpretKey(std::string key);
84
85std::optional<common::SettingsValue> InterpretValue(const KeyInfo& key, const std::string* value,
86 unsigned int flags, std::string& error);
87
89 std::string m_name;
90 std::string m_file;
91 int m_line;
92};
93
94std::string SettingToString(const common::SettingsValue&, const std::string&);
95std::optional<std::string> SettingToString(const common::SettingsValue&);
96
97template <std::integral Int>
98Int SettingTo(const common::SettingsValue&, Int);
99
100template <std::integral Int>
101std::optional<Int> SettingTo(const common::SettingsValue&);
102
103bool SettingToBool(const common::SettingsValue&, bool);
104std::optional<bool> SettingToBool(const common::SettingsValue&);
105
107{
108public:
113 enum Flags : uint32_t {
114 ALLOW_ANY = 0x01,
115 // ALLOW_BOOL = 0x02, //!< unimplemented, draft implementation in #16545
116 // ALLOW_INT = 0x04, //!< unimplemented, draft implementation in #16545
117 // ALLOW_STRING = 0x08, //!< unimplemented, draft implementation in #16545
118 // ALLOW_LIST = 0x10, //!< unimplemented, draft implementation in #16545
121
122 DEBUG_ONLY = 0x100,
123 /* Some options would cause cross-contamination if values for
124 * mainnet were used while running on regtest/testnet (or vice-versa).
125 * Setting them as NETWORK_ONLY ensures that sharing a config file
126 * between mainnet and regtest/testnet won't cause problems due to these
127 * parameters by accident. */
129 // This argument's value is sensitive (such as a password).
130 SENSITIVE = 0x400,
131 COMMAND = 0x800,
132 };
133
134private:
135 struct Arg
136 {
137 std::string m_help_param;
138 std::string m_help_text;
139 unsigned int m_flags;
140 };
141
142 mutable Mutex cs_args;
144 std::vector<std::string> m_command GUARDED_BY(cs_args);
145 std::string m_network GUARDED_BY(cs_args);
146 std::set<std::string> m_network_only_args GUARDED_BY(cs_args);
147 std::map<OptionsCategory, std::map<std::string, Arg>> m_available_args GUARDED_BY(cs_args);
148 std::optional<unsigned int> m_default_flags GUARDED_BY(cs_args){};
149 std::map<std::string, std::set<std::string>> m_command_args GUARDED_BY(cs_args);
150 bool m_accept_any_command GUARDED_BY(cs_args){true};
151 std::list<SectionInfo> m_config_sections GUARDED_BY(cs_args);
152 std::optional<fs::path> m_config_path GUARDED_BY(cs_args);
153 mutable fs::path m_cached_blocks_path GUARDED_BY(cs_args);
154 mutable fs::path m_cached_datadir_path GUARDED_BY(cs_args);
155 mutable fs::path m_cached_network_datadir_path GUARDED_BY(cs_args);
156
162 bool UseDefaultSection(const std::string& arg) const EXCLUSIVE_LOCKS_REQUIRED(cs_args);
163
164protected:
165 [[nodiscard]] bool ReadConfigStream(std::istream& stream, const std::string& filepath, std::string& error, bool ignore_invalid_keys = false) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
166 [[nodiscard]] bool ReadConfigString(const std::string& str_config) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
167
168public:
177
181 std::vector<common::SettingsValue> GetSettingsList(const std::string& arg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
182
185
189 void SelectConfigNetwork(const std::string& network) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
190
191 [[nodiscard]] bool ParseParameters(int argc, const char* const argv[], std::string& error) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
192
198 [[nodiscard]] bool ReadConfigFiles(std::string& error, bool ignore_invalid_keys = false) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
199
207
212
213 struct Command {
215 std::string command;
220 std::vector<std::string> args;
221 };
225 std::optional<const Command> GetCommand() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
226
235 bool CheckCommandOptions(const std::string& command, std::vector<std::string>* errors = nullptr) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
236
243
250
257
262
269 std::vector<std::string> GetArgs(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
270
277 bool IsArgSet(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
278
286 bool IsArgNegated(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
287
295 std::string GetArg(const std::string& strArg, const std::string& strDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
296 std::optional<std::string> GetArg(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
297
308 fs::path GetPathArg(std::string arg, const fs::path& default_value = {}) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
309
317 template <std::integral Int>
318 Int GetArg(const std::string& strArg, Int nDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
319
320 template <std::integral Int>
321 std::optional<Int> GetArg(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
322
323 int64_t GetIntArg(const std::string& strArg, int64_t nDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) { return GetArg<int64_t>(strArg, nDefault); }
324 std::optional<int64_t> GetIntArg(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) { return GetArg<int64_t>(strArg); }
325
333 bool GetBoolArg(const std::string& strArg, bool fDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
334 std::optional<bool> GetBoolArg(const std::string& strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
335
343 bool SoftSetArg(const std::string& strArg, const std::string& strValue) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
344
352 bool SoftSetBoolArg(const std::string& strArg, bool fValue) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
353
354 // Forces an arg setting. Called by SoftSetArg() if the arg hasn't already
355 // been set. Also called directly in testing.
356 void ForceSetArg(const std::string& strArg, const std::string& strValue) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
357
364
371
375 void AddArg(const std::string& name, const std::string& help, unsigned int flags, const OptionsCategory& cat) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
376
380 void AddCommand(const std::string& cmd, const std::string& help, std::set<std::string> options = {}) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
381
385 void AddHiddenArgs(const std::vector<std::string>& args) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
386
391
398
403
408 std::optional<unsigned int> GetArgFlags(const std::string& name) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
409
413 void SetDefaultFlags(std::optional<unsigned int>) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
414
419 bool GetSettingsPath(fs::path* filepath = nullptr, bool temp = false, bool backup = false) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
420
424 bool ReadSettingsFile(std::vector<std::string>* errors = nullptr) EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
425
430 bool WriteSettingsFile(std::vector<std::string>* errors = nullptr, bool backup = false) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
431
437
441 template <typename Fn>
443 {
444 LOCK(cs_args);
445 fn(m_settings);
446 }
447
453
454private:
455 // Internal helpers, for use by callers that already hold `cs_args`.
457 std::optional<unsigned int> GetArgFlags_(const std::string& name) const EXCLUSIVE_LOCKS_REQUIRED(cs_args);
458 fs::path GetPathArg_(std::string arg, const fs::path& default_value = {}) const EXCLUSIVE_LOCKS_REQUIRED(cs_args);
459
466 fs::path GetDataDir(bool net_specific) const EXCLUSIVE_LOCKS_REQUIRED(cs_args);
467
474 std::variant<ChainType, std::string> GetChainArg() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args);
475
476 // Helper function for LogArgs().
477 void logArgsPrefix(
478 const std::string& prefix,
479 const std::string& section,
480 const std::map<std::string, std::vector<common::SettingsValue>>& args) const EXCLUSIVE_LOCKS_REQUIRED(cs_args);
481};
482
483extern ArgsManager gArgs;
484
488bool HelpRequested(const ArgsManager& args);
489
492
493extern const std::vector<std::string> TEST_OPTIONS_DOC;
494
496bool HasTestOption(const ArgsManager& args, const std::string& test_option);
497
504std::string HelpMessageGroup(const std::string& message);
505
515std::string HelpMessageOpt(std::string_view option, std::string_view help_param, std::string_view message, bool subopt = false);
516
517#endif // BITCOIN_COMMON_ARGS_H
const std::vector< std::string > TEST_OPTIONS_DOC
Definition: args.cpp:845
bool HelpRequested(const ArgsManager &args)
Definition: args.cpp:812
void SetupHelpOptions(ArgsManager &args)
Add help options to the args manager.
Definition: args.cpp:817
std::string SettingToString(const common::SettingsValue &, const std::string &)
Definition: args.cpp:537
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:827
bool SettingToBool(const common::SettingsValue &, bool)
Definition: args.cpp:589
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:103
OptionsCategory
Definition: args.h:53
const char *const BITCOIN_SETTINGS_FILENAME
Definition: args.cpp:36
bool CheckDataDirOption(const ArgsManager &args)
Definition: args.cpp:891
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:237
Int SettingTo(const common::SettingsValue &, Int)
Definition: args.cpp:566
ArgsManager gArgs
Definition: args.cpp:38
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:851
std::string HelpMessageGroup(const std::string &message)
Format a string to be used as group of options in help messages.
Definition: args.cpp:823
KeyInfo InterpretKey(std::string key)
Parse "name", "section.name", "noname", "section.noname" settings keys.
Definition: args.cpp:75
const char *const BITCOIN_CONF_FILENAME
Definition: args.cpp:35
bool IsSwitchChar(char c)
Definition: args.h:44
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:175
std::vector< common::SettingsValue > GetSettingsList(const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get list of setting values.
Definition: args.cpp:976
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:422
std::optional< unsigned int > m_default_flags GUARDED_BY(cs_args)
Definition: args.h:148
ChainType GetChainType() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Returns the appropriate chain type from the program arguments.
Definition: args.cpp:910
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:703
Flags
Flags controlling how config and command line arguments are validated and interpreted.
Definition: args.h:113
@ NETWORK_ONLY
Definition: args.h:128
@ ALLOW_ANY
disable validation
Definition: args.h:114
@ DISALLOW_NEGATION
disallow -nofoo syntax
Definition: args.h:119
@ DISALLOW_ELISION
disallow -foo syntax that doesn't assign any value
Definition: args.h:120
@ DEBUG_ONLY
Definition: args.h:122
@ COMMAND
Definition: args.h:131
@ SENSITIVE
Definition: args.h:130
std::list< SectionInfo > GetUnrecognizedSections() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Log warnings for unrecognized section names in the config file.
Definition: args.cpp:152
common::SettingsValue GetSetting(const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get setting value.
Definition: args.cpp:970
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:436
bool ReadConfigString(const std::string &str_config) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: config.cpp:120
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:388
fs::path GetBlocksDirPath() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get blocks directory path.
Definition: args.cpp:298
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:323
fs::path GetConfigFilePath() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return config file path (read-only)
Definition: args.cpp:897
void SetDefaultFlags(std::optional< unsigned int >) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Set default flags to return for an unknown arg.
Definition: args.cpp:274
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:633
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:611
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:132
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:657
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:485
fs::path GetPathArg_(std::string arg, const fs::path &default_value={}) const EXCLUSIVE_LOCKS_REQUIRED(cs_args)
Definition: args.cpp:280
std::optional< int64_t > GetIntArg(const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: args.h:324
void LockSettings(Fn &&fn) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Access settings with lock held.
Definition: args.h:442
bool ReadConfigFiles(std::string &error, bool ignore_invalid_keys=false) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: config.cpp:132
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:359
fs::path GetDataDir(bool net_specific) const EXCLUSIVE_LOCKS_REQUIRED(cs_args)
Get data directory path.
Definition: args.cpp:333
fs::path m_cached_blocks_path GUARDED_BY(cs_args)
void SetConfigFilePath(fs::path) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: args.cpp:903
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:505
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:627
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:292
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:1000
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:517
void AddHiddenArgs(const std::vector< std::string > &args) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Add many hidden arguments.
Definition: args.cpp:686
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:924
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:982
std::string GetChainTypeString() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Returns the appropriate chain type string from the program arguments.
Definition: args.cpp:917
bool ReadSettingsFile(std::vector< std::string > *errors=nullptr) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Read settings file.
Definition: args.cpp:462
void ClearArgs() EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Clear available arguments.
Definition: args.cpp:693
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:431
Mutex cs_args
Definition: args.h:142
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:368
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:619
fs::path GetDataDirNet() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get data directory path with appended network identifier.
Definition: args.cpp:328
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:512
common::SettingsValue GetSetting_(const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(cs_args)
Definition: args.cpp:962
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:91
std::optional< unsigned int > GetArgFlags(const std::string &name) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return Flags for known arg.
Definition: args.cpp:268
std::optional< unsigned int > GetArgFlags_(const std::string &name) const EXCLUSIVE_LOCKS_REQUIRED(cs_args)
Definition: args.cpp:256
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Definition: args.h:323
bool m_accept_any_command GUARDED_BY(cs_args)
Definition: args.h:150
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:956
bool GetBoolArg(const std::string &strArg, bool fDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return boolean argument or default value.
Definition: args.cpp:571
void SelectConfigNetwork(const std::string &network) EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Select the network in use.
Definition: args.cpp:169
std::string GetHelpMessage() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get the help string.
Definition: args.cpp:720
Definition: init.cpp:17
UniValue SettingsValue
Settings value type (string/integer/boolean/null variant).
Definition: settings.h:30
CRPCCommand m_command
Definition: interfaces.cpp:554
const char * prefix
Definition: rest.cpp:1143
const char * name
Definition: rest.cpp:50
static RPCMethod help()
Definition: server.cpp:123
std::string m_help_param
Definition: args.h:137
unsigned int m_flags
Definition: args.h:139
std::string m_help_text
Definition: args.h:138
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:220
std::string command
The command (if one has been registered with AddCommand), or empty.
Definition: args.h:215
Definition: args.h:77
std::string name
Definition: args.h:78
bool negated
Definition: args.h:80
std::string section
Definition: args.h:79
int m_line
Definition: args.h:91
std::string m_file
Definition: args.h:90
std::string m_name
Definition: args.h:89
Stored settings.
Definition: settings.h:34
#define LOCK(cs)
Definition: sync.h:268
#define EXCLUSIVE_LOCKS_REQUIRED(...)
Definition: threadsafety.h:49