mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
[net] Signal NODE_COMPACT_FILTERS if we're serving compact filters.
If -peerblockfilters is configured, signal the NODE_COMPACT_FILTERS service bit to indicate that we are able to serve compact block filters, headers and checkpoints.
This commit is contained in:
parent
b3fbc94d4f
commit
132b30d9c8
4 changed files with 12 additions and 6 deletions
12
src/init.cpp
12
src/init.cpp
|
|
@ -996,11 +996,13 @@ bool AppInitParameterInteraction()
|
|||
}
|
||||
}
|
||||
|
||||
// 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."));
|
||||
// Signal NODE_COMPACT_FILTERS if peerblockfilters and basic filters index are both enabled.
|
||||
if (gArgs.GetBoolArg("-peerblockfilters", DEFAULT_PEERBLOCKFILTERS)) {
|
||||
if (g_enabled_filter_types.count(BlockFilterType::BASIC) != 1) {
|
||||
return InitError(_("Cannot set -peerblockfilters without -blockfilterindex."));
|
||||
}
|
||||
|
||||
nLocalServices = ServiceFlags(nLocalServices | NODE_COMPACT_FILTERS);
|
||||
}
|
||||
|
||||
// if using block pruning, then disallow txindex
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue