Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 1,742 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 | // Signal NODE_COMPACT_FILTERS if peerblockfilters and basic filters index | ||||
// must be enabled to serve compact filters | // are both enabled. | ||||
if (args.GetBoolArg("-peerblockfilters", DEFAULT_PEERBLOCKFILTERS) && | if (gArgs.GetBoolArg("-peerblockfilters", DEFAULT_PEERBLOCKFILTERS)) { | ||||
g_enabled_filter_types.count(BlockFilterType::BASIC) != 1) { | if (g_enabled_filter_types.count(BlockFilterType::BASIC) != 1) { | ||||
return InitError( | return InitError( | ||||
_("Cannot set -peerblockfilters without -blockfilterindex.")); | _("Cannot set -peerblockfilters without -blockfilterindex.")); | ||||
} | } | ||||
nLocalServices = ServiceFlags(nLocalServices | NODE_COMPACT_FILTERS); | |||||
} | |||||
// if using block pruning, then disallow txindex | // if using block pruning, then disallow txindex | ||||
if (args.GetArg("-prune", 0)) { | if (args.GetArg("-prune", 0)) { | ||||
if (args.GetBoolArg("-txindex", DEFAULT_TXINDEX)) { | if (args.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,188 Lines • Show Last 20 Lines |