Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-cli.cpp
// 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. | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include <config/bitcoin-config.h> | #include <config/bitcoin-config.h> | ||||
#endif | #endif | ||||
#include <chainparamsbase.h> | #include <chainparamsbase.h> | ||||
#include <clientversion.h> | #include <clientversion.h> | ||||
#include <currencyunit.h> | |||||
#include <rpc/client.h> | #include <rpc/client.h> | ||||
#include <rpc/protocol.h> | #include <rpc/protocol.h> | ||||
#include <rpc/request.h> | #include <rpc/request.h> | ||||
#include <support/events.h> | #include <support/events.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <util/translation.h> | #include <util/translation.h> | ||||
Show All 23 Lines | static void SetupCliArgs(ArgsManager &argsman) { | ||||
const auto defaultBaseParams = | const auto defaultBaseParams = | ||||
CreateBaseChainParams(CBaseChainParams::MAIN); | CreateBaseChainParams(CBaseChainParams::MAIN); | ||||
const auto testnetBaseParams = | const auto testnetBaseParams = | ||||
CreateBaseChainParams(CBaseChainParams::TESTNET); | CreateBaseChainParams(CBaseChainParams::TESTNET); | ||||
const auto regtestBaseParams = | const auto regtestBaseParams = | ||||
CreateBaseChainParams(CBaseChainParams::REGTEST); | CreateBaseChainParams(CBaseChainParams::REGTEST); | ||||
SetupCurrencyUnitOptions(argsman); | |||||
argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, | argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, | ||||
OptionsCategory::OPTIONS); | OptionsCategory::OPTIONS); | ||||
argsman.AddArg( | argsman.AddArg( | ||||
"-conf=<file>", | "-conf=<file>", | ||||
strprintf("Specify configuration file. Relative paths will be " | strprintf("Specify configuration file. Relative paths will be " | ||||
"prefixed by datadir location. (default: %s)", | "prefixed by datadir location. (default: %s)", | ||||
BITCOIN_CONF_FILENAME), | BITCOIN_CONF_FILENAME), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||||
▲ Show 20 Lines • Show All 995 Lines • Show Last 20 Lines |