Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 684 Lines • ▼ Show 20 Lines | gArgs.AddArg( | ||||
"onion). Incoming connections are not affected by this option. This " | "onion). Incoming connections are not affected by this option. This " | ||||
"option can be specified multiple times to allow multiple networks.", | "option can be specified multiple times to allow multiple networks.", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-peerbloomfilters", | gArgs.AddArg("-peerbloomfilters", | ||||
strprintf("Support filtering of blocks and transaction with " | strprintf("Support filtering of blocks and transaction with " | ||||
"bloom filters (default: %d)", | "bloom filters (default: %d)", | ||||
DEFAULT_PEERBLOOMFILTERS), | DEFAULT_PEERBLOOMFILTERS), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | |||||
"-peerblockfilters", | |||||
strprintf( | |||||
"Serve compact block filters to peers per BIP 157 (default: %u)", | |||||
DEFAULT_PEERBLOCKFILTERS), | |||||
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | |||||
gArgs.AddArg("-permitbaremultisig", | gArgs.AddArg("-permitbaremultisig", | ||||
strprintf("Relay non-P2SH multisig (default: %d)", | strprintf("Relay non-P2SH multisig (default: %d)", | ||||
DEFAULT_PERMIT_BAREMULTISIG), | DEFAULT_PERMIT_BAREMULTISIG), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-port=<port>", | gArgs.AddArg("-port=<port>", | ||||
strprintf("Listen for connections on <port> (default: %u, " | strprintf("Listen for connections on <port> (default: %u, " | ||||
"testnet: %u, regtest: %u)", | "testnet: %u, regtest: %u)", | ||||
defaultChainParams->GetDefaultPort(), | defaultChainParams->GetDefaultPort(), | ||||
▲ Show 20 Lines • Show All 983 Lines • ▼ Show 20 Lines | if (blockfilterindex_value == "" || blockfilterindex_value == "1") { | ||||
if (!BlockFilterTypeByName(name, filter_type)) { | if (!BlockFilterTypeByName(name, filter_type)) { | ||||
return InitError( | return InitError( | ||||
strprintf(_("Unknown -blockfilterindex value %s."), name)); | strprintf(_("Unknown -blockfilterindex value %s."), name)); | ||||
} | } | ||||
g_enabled_filter_types.insert(filter_type); | g_enabled_filter_types.insert(filter_type); | ||||
} | } | ||||
} | } | ||||
// Basic filters are the only supported filters. The basic filters index | |||||
// must be enabled to serve compact filters | |||||
if (gArgs.GetBoolArg("-peerblockfilters", DEFAULT_PEERBLOCKFILTERS) && | |||||
g_enabled_filter_types.count(BlockFilterType::BASIC) != 1) { | |||||
return InitError( | |||||
_("Cannot set -peerblockfilters without -blockfilterindex.")); | |||||
} | |||||
// if using block pruning, then disallow txindex | // if using block pruning, then disallow txindex | ||||
if (gArgs.GetArg("-prune", 0)) { | if (gArgs.GetArg("-prune", 0)) { | ||||
if (gArgs.GetBoolArg("-txindex", DEFAULT_TXINDEX)) { | if (gArgs.GetBoolArg("-txindex", DEFAULT_TXINDEX)) { | ||||
return InitError(_("Prune mode is incompatible with -txindex.")); | return InitError(_("Prune mode is incompatible with -txindex.")); | ||||
} | } | ||||
if (!g_enabled_filter_types.empty()) { | if (!g_enabled_filter_types.empty()) { | ||||
return InitError( | return InitError( | ||||
_("Prune mode is incompatible with -blockfilterindex.")); | _("Prune mode is incompatible with -blockfilterindex.")); | ||||
▲ Show 20 Lines • Show All 1,133 Lines • Show Last 20 Lines |