Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 1,386 Lines • ▼ Show 20 Lines | #endif | ||||
argsman.AddArg("-avaproof", | argsman.AddArg("-avaproof", | ||||
"Avalanche proof to be used by this node (default: none)", | "Avalanche proof to be used by this node (default: none)", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::AVALANCHE); | ArgsManager::ALLOW_ANY, OptionsCategory::AVALANCHE); | ||||
argsman.AddArg( | argsman.AddArg( | ||||
"-legacyavaproof", | "-legacyavaproof", | ||||
strprintf("Use the legacy avalanche proof format (default: %u)", | strprintf("Use the legacy avalanche proof format (default: %u)", | ||||
AVALANCHE_DEFAULT_LEGACY_PROOF), | AVALANCHE_DEFAULT_LEGACY_PROOF), | ||||
ArgsManager::ALLOW_BOOL, OptionsCategory::AVALANCHE); | ArgsManager::ALLOW_BOOL, OptionsCategory::AVALANCHE); | ||||
argsman.AddArg( | |||||
"-avaproofutxoconfirmations", | |||||
strprintf("Minimum number of confirmations before a utxo is mature" | |||||
" enough for being included into a proof (default: %s)", | |||||
AVALANCHE_DEFAULT_UTXO_CONFIRMATIONS), | |||||
ArgsManager::ALLOW_INT, OptionsCategory::AVALANCHE); | |||||
argsman.AddArg("-avamasterkey", | argsman.AddArg("-avamasterkey", | ||||
"Master key associated with the proof. If a proof is " | "Master key associated with the proof. If a proof is " | ||||
"required, this is mandatory.", | "required, this is mandatory.", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::AVALANCHE); | ArgsManager::ALLOW_ANY, OptionsCategory::AVALANCHE); | ||||
argsman.AddArg("-avasessionkey", "Avalanche session key (default: random)", | argsman.AddArg("-avasessionkey", "Avalanche session key (default: random)", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::AVALANCHE); | ArgsManager::ALLOW_ANY, OptionsCategory::AVALANCHE); | ||||
argsman.AddArg( | argsman.AddArg( | ||||
"-maxavalancheoutbound", | "-maxavalancheoutbound", | ||||
▲ Show 20 Lines • Show All 262 Lines • ▼ Show 20 Lines | void InitParameterInteraction(ArgsManager &args) { | ||||
// If avalanche is set, soft set all the feature flags accordingly. | // If avalanche is set, soft set all the feature flags accordingly. | ||||
if (args.IsArgSet("-avalanche")) { | if (args.IsArgSet("-avalanche")) { | ||||
const bool fAvalanche = | const bool fAvalanche = | ||||
args.GetBoolArg("-avalanche", AVALANCHE_DEFAULT_ENABLED); | args.GetBoolArg("-avalanche", AVALANCHE_DEFAULT_ENABLED); | ||||
args.SoftSetBoolArg("-enableavalanche", fAvalanche); | args.SoftSetBoolArg("-enableavalanche", fAvalanche); | ||||
args.SoftSetBoolArg("-legacyavaproof", | args.SoftSetBoolArg("-legacyavaproof", | ||||
fAvalanche ? false | fAvalanche ? false | ||||
: AVALANCHE_DEFAULT_LEGACY_PROOF); | : AVALANCHE_DEFAULT_LEGACY_PROOF); | ||||
args.SoftSetArg("-avaproofutxoconfirmations", | |||||
fAvalanche | |||||
? "2016" | |||||
: ToString(AVALANCHE_DEFAULT_UTXO_CONFIRMATIONS)); | |||||
args.SoftSetBoolArg("-enableavalanchepeerdiscovery", fAvalanche); | args.SoftSetBoolArg("-enableavalanchepeerdiscovery", fAvalanche); | ||||
args.SoftSetBoolArg("-enableavalancheproofreplacement", fAvalanche); | args.SoftSetBoolArg("-enableavalancheproofreplacement", fAvalanche); | ||||
args.SoftSetBoolArg("-automaticunparking", !fAvalanche); | args.SoftSetBoolArg("-automaticunparking", !fAvalanche); | ||||
args.SoftSetArg( | args.SoftSetArg( | ||||
"-avaminquorumstake", | "-avaminquorumstake", | ||||
fAvalanche | fAvalanche | ||||
? FormatMoney(int64_t(1'000'000'000'000) * SATOSHI) // 10B XEC | ? FormatMoney(int64_t(1'000'000'000'000) * SATOSHI) // 10B XEC | ||||
: FormatMoney(AVALANCHE_DEFAULT_MIN_QUORUM_STAKE)); | : FormatMoney(AVALANCHE_DEFAULT_MIN_QUORUM_STAKE)); | ||||
▲ Show 20 Lines • Show All 1,477 Lines • Show Last 20 Lines |