Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 849 Lines • ▼ Show 20 Lines | if (showDebug) { | ||||
DEFAULT_HTTP_WORKQUEUE)); | DEFAULT_HTTP_WORKQUEUE)); | ||||
strUsage += HelpMessageOpt( | strUsage += HelpMessageOpt( | ||||
"-rpcservertimeout=<n>", | "-rpcservertimeout=<n>", | ||||
strprintf("Timeout during HTTP requests (default: %d)", | strprintf("Timeout during HTTP requests (default: %d)", | ||||
DEFAULT_HTTP_SERVER_TIMEOUT)); | DEFAULT_HTTP_SERVER_TIMEOUT)); | ||||
} | } | ||||
strUsage += HelpMessageGroup(_("Hard Fork options:")); | strUsage += HelpMessageGroup(_("Hard Fork options:")); | ||||
strUsage += | strUsage += HelpMessageOpt( | ||||
HelpMessageOpt("-uahfstarttime=<n>", | "-uahfstarttime=<n>", | ||||
strprintf(_("UAHF activation (integer) POSIX " | strprintf(_("(Deprecated) UAHF activation (integer) " | ||||
"time, seconds since epoch (default: %u)"), | "POSIX time, seconds since epoch (default: %u)"), | ||||
DEFAULT_UAHF_START_TIME)); | DEFAULT_UAHF_START_TIME)); | ||||
return strUsage; | return strUsage; | ||||
} | } | ||||
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>"; | ||||
const std::string URL_WEBSITE = "<https://www.bitcoinabc.org>"; | const std::string URL_WEBSITE = "<https://www.bitcoinabc.org>"; | ||||
▲ Show 20 Lines • Show All 532 Lines • ▼ Show 20 Lines | bool AppInitParameterInteraction(Config &config) { | ||||
const uint64_t nProposedMaxGeneratedBlockSize = | const uint64_t nProposedMaxGeneratedBlockSize = | ||||
GetArg("-blockmaxsize", DEFAULT_MAX_GENERATED_BLOCK_SIZE); | GetArg("-blockmaxsize", DEFAULT_MAX_GENERATED_BLOCK_SIZE); | ||||
if (nProposedMaxGeneratedBlockSize > config.GetMaxBlockSize()) { | if (nProposedMaxGeneratedBlockSize > config.GetMaxBlockSize()) { | ||||
auto msg = _("Max generated block size (blockmaxsize) cannot exceed " | auto msg = _("Max generated block size (blockmaxsize) cannot exceed " | ||||
"the excessive block size (excessiveblocksize)"); | "the excessive block size (excessiveblocksize)"); | ||||
return InitError(msg); | return InitError(msg); | ||||
} | } | ||||
const int64_t nProposedUAHFStartTime = | const int64_t uahfFromArgs = | ||||
GetArg("-uahfstarttime", DEFAULT_UAHF_START_TIME); | GetArg("-uahfstarttime", DEFAULT_UAHF_START_TIME); | ||||
if (!config.SetUAHFStartTime(nProposedUAHFStartTime)) { | if (uahfFromArgs != int64_t(DEFAULT_UAHF_START_TIME)) { | ||||
return InitError( | LogPrintf("WARNING: Deprecated use of -uahfstarttime=%d parameter\n", | ||||
strprintf(_("Unable to set uahfstarttime to the value (%d)"), | uahfFromArgs); | ||||
nProposedUAHFStartTime)); | } | ||||
assert(nProposedUAHFStartTime == config.GetUAHFStartTime()); | if (!config.SetUAHFStartTime(uahfFromArgs)) { | ||||
return InitError(strprintf( | |||||
_("Unable to set uahfstarttime to the value (%d)"), uahfFromArgs)); | |||||
} | } | ||||
assert(config.GetUAHFStartTime() == uahfFromArgs); | |||||
// block pruning; get the amount of disk space (in MiB) to allot for block & | // block pruning; get the amount of disk space (in MiB) to allot for block & | ||||
// undo files | // undo files | ||||
int64_t nPruneArg = GetArg("-prune", 0); | int64_t nPruneArg = GetArg("-prune", 0); | ||||
if (nPruneArg < 0) { | if (nPruneArg < 0) { | ||||
return InitError( | return InitError( | ||||
_("Prune cannot be configured with a negative value.")); | _("Prune cannot be configured with a negative value.")); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 752 Lines • Show Last 20 Lines |