Changeset View
Changeset View
Standalone View
Standalone View
src/util/system.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
/** | /** | ||||
* Server/client environment: argument handling, config file parsing, | * Server/client environment: argument handling, config file parsing, | ||||
* thread wrappers, startup time | * thread wrappers, startup time | ||||
*/ | */ | ||||
#ifndef BITCOIN_UTIL_SYSTEM_H | #ifndef BITCOIN_UTIL_SYSTEM_H | ||||
#define BITCOIN_UTIL_SYSTEM_H | #define BITCOIN_UTIL_SYSTEM_H | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include <config/bitcoin-config.h> | #include <config/bitcoin-config.h> | ||||
#endif | #endif | ||||
#include <attributes.h> | |||||
#include <compat.h> | #include <compat.h> | ||||
#include <compat/assumptions.h> | #include <compat/assumptions.h> | ||||
#include <fs.h> | #include <fs.h> | ||||
#include <logging.h> | #include <logging.h> | ||||
#include <sync.h> | #include <sync.h> | ||||
#include <tinyformat.h> | #include <tinyformat.h> | ||||
#include <util/time.h> | #include <util/time.h> | ||||
▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | |||||
public: | public: | ||||
ArgsManager(); | ArgsManager(); | ||||
/** | /** | ||||
* Select the network in use | * Select the network in use | ||||
*/ | */ | ||||
void SelectConfigNetwork(const std::string &network); | void SelectConfigNetwork(const std::string &network); | ||||
bool ParseParameters(int argc, const char *const argv[], | NODISCARD bool ParseParameters(int argc, const char *const argv[], | ||||
std::string &error); | std::string &error); | ||||
bool ReadConfigFiles(std::string &error, bool ignore_invalid_keys = false); | bool ReadConfigFiles(std::string &error, bool ignore_invalid_keys = false); | ||||
/** | /** | ||||
* Log warnings for options in m_section_only_args when they are specified | * 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 | * in the default section but not overridden on the command line or in a | ||||
* network-specific section in the config file. | * network-specific section in the config file. | ||||
*/ | */ | ||||
void WarnForSectionOnlyArgs(); | void WarnForSectionOnlyArgs(); | ||||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |