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( | |||||
"-avaproofstakeutxoconfirmations", | |||||
strprintf( | |||||
"Minimum number of confirmations before a stake utxo is mature" | |||||
" enough to be included into a proof (default: %s)", | |||||
AVALANCHE_DEFAULT_STAKE_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 728 Lines • ▼ Show 20 Lines | #endif | ||||
nMaxTipAge = args.GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE); | nMaxTipAge = args.GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE); | ||||
if (args.IsArgSet("-proxy") && args.GetArg("-proxy", "").empty()) { | if (args.IsArgSet("-proxy") && args.GetArg("-proxy", "").empty()) { | ||||
return InitError(_( | return InitError(_( | ||||
"No proxy server specified. Use -proxy=<ip> or -proxy=<ip:port>.")); | "No proxy server specified. Use -proxy=<ip> or -proxy=<ip:port>.")); | ||||
} | } | ||||
// Avalanche parameters | |||||
const int64_t stakeUtxoMinConfirmations = | |||||
args.GetArg("-avaproofstakeutxoconfirmations", | |||||
AVALANCHE_DEFAULT_STAKE_UTXO_CONFIRMATIONS); | |||||
if (!chainparams.IsTestChain() && | |||||
stakeUtxoMinConfirmations != | |||||
AVALANCHE_DEFAULT_STAKE_UTXO_CONFIRMATIONS) { | |||||
return InitError(_("Avalanche stake UTXO minimum confirmations can " | |||||
"only be set on test chains.")); | |||||
} | |||||
return true; | return true; | ||||
} | } | ||||
static bool LockDataDirectory(bool probeOnly) { | static bool LockDataDirectory(bool probeOnly) { | ||||
// Make sure only a single Bitcoin process is using the data directory. | // Make sure only a single Bitcoin process is using the data directory. | ||||
fs::path datadir = GetDataDir(); | fs::path datadir = GetDataDir(); | ||||
if (!DirIsWritable(datadir)) { | if (!DirIsWritable(datadir)) { | ||||
return InitError(strprintf( | return InitError(strprintf( | ||||
▲ Show 20 Lines • Show All 1,015 Lines • Show Last 20 Lines |