Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2018 The Bitcoin Core developers | // Copyright (c) 2009-2018 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 <init.h> | #include <init.h> | ||||
#include <addrman.h> | #include <addrman.h> | ||||
#include <avalanche/avalanche.h> | #include <avalanche/avalanche.h> | ||||
#include <avalanche/postconsensus.h> | |||||
#include <avalanche/processor.h> | #include <avalanche/processor.h> | ||||
#include <avalanche/proof.h> // For AVALANCHE_LEGACY_PROOF_DEFAULT | #include <avalanche/proof.h> // For AVALANCHE_LEGACY_PROOF_DEFAULT | ||||
#include <avalanche/validation.h> | #include <avalanche/validation.h> | ||||
#include <avalanche/voterecord.h> // For AVALANCHE_VOTE_STALE_* | #include <avalanche/voterecord.h> // For AVALANCHE_VOTE_STALE_* | ||||
#include <banman.h> | #include <banman.h> | ||||
#include <blockfilter.h> | #include <blockfilter.h> | ||||
#include <chain.h> | #include <chain.h> | ||||
#include <chainparams.h> | #include <chainparams.h> | ||||
▲ Show 20 Lines • Show All 1,399 Lines • ▼ Show 20 Lines | #endif | ||||
argsman.AddArg( | argsman.AddArg( | ||||
"-maxavalancheoutbound", | "-maxavalancheoutbound", | ||||
strprintf( | strprintf( | ||||
"Set the maximum number of avalanche outbound peers to connect to. " | "Set the maximum number of avalanche outbound peers to connect to. " | ||||
"Note that the -maxconnections option takes precedence (default: " | "Note that the -maxconnections option takes precedence (default: " | ||||
"%u).", | "%u).", | ||||
DEFAULT_MAX_AVALANCHE_OUTBOUND_CONNECTIONS), | DEFAULT_MAX_AVALANCHE_OUTBOUND_CONNECTIONS), | ||||
ArgsManager::ALLOW_INT, OptionsCategory::AVALANCHE); | ArgsManager::ALLOW_INT, OptionsCategory::AVALANCHE); | ||||
argsman.AddArg( | |||||
"-avapolicyearlyblockpenalty", | |||||
strprintf("Enable the avalanche post-consensus policy to apply a " | |||||
"difficulty penalty to early blocks. Early blocks will be " | |||||
"voted against but will still finalize if the rest of the " | |||||
"network accepts the block. (default: %u)", | |||||
avalanche::EARLY_BLOCK_PENALTY_DEFAULT_ENABLED), | |||||
ArgsManager::ALLOW_BOOL, OptionsCategory::AVALANCHE); | |||||
argsman.AddArg( | |||||
"-avapolicyearlyblockpenaltyfactor", | |||||
strprintf( | |||||
"Difficulty penalty factor applied to early blocks. (default: %u)", | |||||
avalanche::EARLY_BLOCK_PENALTY_FACTOR_DEFAULT), | |||||
ArgsManager::ALLOW_INT, OptionsCategory::AVALANCHE); | |||||
argsman.AddArg( | |||||
"-avapolicyearlyblockpenaltywindow", | |||||
strprintf("A difficulty penalty is applied if a block is received " | |||||
"within the penalty window from the previous block's " | |||||
"received time. Unit is seconds (default: %u)", | |||||
avalanche::EARLY_BLOCK_PENALTY_WINDOW_DEFAULT), | |||||
ArgsManager::ALLOW_INT, OptionsCategory::AVALANCHE); | |||||
// Add the hidden options | // Add the hidden options | ||||
argsman.AddHiddenArgs(hidden_args); | argsman.AddHiddenArgs(hidden_args); | ||||
} | } | ||||
std::string LicenseInfo() { | std::string LicenseInfo() { | ||||
const std::string URL_SOURCE_CODE = | const std::string URL_SOURCE_CODE = | ||||
"<https://github.com/Bitcoin-ABC/bitcoin-abc>"; | "<https://github.com/Bitcoin-ABC/bitcoin-abc>"; | ||||
▲ Show 20 Lines • Show All 1,792 Lines • Show Last 20 Lines |