|
| common::SettingsValue | GetSetting (const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Get setting value. More...
|
| |
| std::vector< common::SettingsValue > | GetSettingsList (const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Get list of setting values. More...
|
| |
| | ArgsManager () |
| |
| | ~ArgsManager () |
| |
| void | SelectConfigNetwork (const std::string &network) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Select the network in use. More...
|
| |
| bool | ParseParameters (int argc, const char *const argv[], std::string &error) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| |
| fs::path | GetConfigFilePath () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Return config file path (read-only) More...
|
| |
| void | SetConfigFilePath (fs::path) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| |
| bool | ReadConfigFiles (std::string &error, bool ignore_invalid_keys=false) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| |
| 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 not overridden on the command line or in a network-specific section in the config file. More...
|
| |
| std::list< SectionInfo > | GetUnrecognizedSections () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Log warnings for unrecognized section names in the config file. More...
|
| |
| std::optional< const Command > | GetCommand () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Get the command and command args (returns std::nullopt if no command provided) More...
|
| |
| 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. More...
|
| |
| fs::path | GetBlocksDirPath () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Get blocks directory path. More...
|
| |
| fs::path | GetDataDirBase () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Get data directory path. More...
|
| |
| fs::path | GetDataDirNet () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Get data directory path with appended network identifier. More...
|
| |
| void | ClearPathCache () EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Clear cached directory paths. More...
|
| |
| std::vector< std::string > | GetArgs (const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Return a vector of strings of the given argument. More...
|
| |
| bool | IsArgSet (const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Return true if the given argument has been manually set. More...
|
| |
| 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. More...
|
| |
| std::string | GetArg (const std::string &strArg, const std::string &strDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Return string argument or default value. More...
|
| |
| std::optional< std::string > | GetArg (const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| |
| fs::path | GetPathArg (std::string arg, const fs::path &default_value={}) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Return path argument or default value. More...
|
| |
| template<std::integral Int> |
| Int | GetArg (const std::string &strArg, Int nDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Return integer argument or default value. More...
|
| |
| template<std::integral Int> |
| std::optional< Int > | GetArg (const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| |
| int64_t | GetIntArg (const std::string &strArg, int64_t nDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| |
| std::optional< int64_t > | GetIntArg (const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| |
| bool | GetBoolArg (const std::string &strArg, bool fDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Return boolean argument or default value. More...
|
| |
| std::optional< bool > | GetBoolArg (const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| |
| 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. More...
|
| |
| 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. More...
|
| |
| void | ForceSetArg (const std::string &strArg, const std::string &strValue) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| |
| ChainType | GetChainType () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Returns the appropriate chain type from the program arguments. More...
|
| |
| std::string | GetChainTypeString () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Returns the appropriate chain type string from the program arguments. More...
|
| |
| void | AddArg (const std::string &name, const std::string &help, unsigned int flags, const OptionsCategory &cat) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Add argument. More...
|
| |
| void | AddCommand (const std::string &cmd, const std::string &help, std::set< std::string > options={}) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Add command. More...
|
| |
| void | AddHiddenArgs (const std::vector< std::string > &args) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Add many hidden arguments. More...
|
| |
| void | ClearArgs () EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Clear available arguments. More...
|
| |
| void | CheckMultipleCLIArgs () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Check CLI command args. More...
|
| |
| std::string | GetHelpMessage () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Get the help string. More...
|
| |
| std::optional< unsigned int > | GetArgFlags (const std::string &name) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Return Flags for known arg. More...
|
| |
| void | SetDefaultFlags (std::optional< unsigned int >) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Set default flags to return for an unknown arg. More...
|
| |
| 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. More...
|
| |
| bool | ReadSettingsFile (std::vector< std::string > *errors=nullptr) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Read settings file. More...
|
| |
| bool | WriteSettingsFile (std::vector< std::string > *errors=nullptr, bool backup=false) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Write settings file or backup settings file. More...
|
| |
| 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 or forced settings values. More...
|
| |
| template<typename Fn > |
| void | LockSettings (Fn &&fn) EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Access settings with lock held. More...
|
| |
| void | LogArgs () const EXCLUSIVE_LOCKS_REQUIRED(!cs_args) |
| | Log the config file options and the command line arguments, useful for troubleshooting. More...
|
| |
|
| common::Settings m_settings | GUARDED_BY (cs_args) |
| |
| std::vector< std::string > m_command | GUARDED_BY (cs_args) |
| |
| std::string m_network | GUARDED_BY (cs_args) |
| |
| std::set< std::string > m_network_only_args | GUARDED_BY (cs_args) |
| |
| std::map< OptionsCategory, std::map< std::string, Arg > > m_available_args | GUARDED_BY (cs_args) |
| |
| std::optional< unsigned int > m_default_flags | GUARDED_BY (cs_args) |
| |
| std::map< std::string, std::set< std::string > > m_command_args | GUARDED_BY (cs_args) |
| |
| bool m_accept_any_command | GUARDED_BY (cs_args) |
| |
| std::list< SectionInfo > m_config_sections | GUARDED_BY (cs_args) |
| |
| std::optional< fs::path > m_config_path | GUARDED_BY (cs_args) |
| |
| fs::path m_cached_blocks_path | GUARDED_BY (cs_args) |
| |
| fs::path m_cached_datadir_path | GUARDED_BY (cs_args) |
| |
| 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 network and whether the setting is network-specific. More...
|
| |
| common::SettingsValue | GetSetting_ (const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(cs_args) |
| |
| std::optional< unsigned int > | GetArgFlags_ (const std::string &name) const EXCLUSIVE_LOCKS_REQUIRED(cs_args) |
| |
| fs::path | GetPathArg_ (std::string arg, const fs::path &default_value={}) const EXCLUSIVE_LOCKS_REQUIRED(cs_args) |
| |
| fs::path | GetDataDir (bool net_specific) const EXCLUSIVE_LOCKS_REQUIRED(cs_args) |
| | Get data directory path. More...
|
| |
| 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 type was set, or as a string if an unrecognized chain name was set. More...
|
| |
| void | logArgsPrefix (const std::string &prefix, const std::string §ion, const std::map< std::string, std::vector< common::SettingsValue > > &args) const EXCLUSIVE_LOCKS_REQUIRED(cs_args) |
| |
Definition at line 107 of file args.h.