mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
Merge #19070: p2p: Signal support for compact block filters with NODE_COMPACT_FILTERS
f5c003d3ea[test] Add test for NODE_COMPACT_FILTER. (Jim Posen)132b30d9c8[net] Signal NODE_COMPACT_FILTERS if we're serving compact filters. (Jim Posen)b3fbc94d4fApply cfilters review fixups (John Newbery) Pull request description: 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. ACKs for top commit: MarcoFalke: re-review and Concept ACKf5c003d3eafjahr: Code review ACKf5c003d3eaclarkmoody: Concept ACKf5c003d3eaariard: Concept and Code Review ACKf5c003djonatack: ACKf5c003d3eTree-SHA512: 34d1c153530a0e55d09046fe548c9dc37344b5d6d50e00af1b4e1de1e7b49de770fca8471346a17c151de9fe164776296bb3dd5af331977f0c3ef1e6fc906f85
This commit is contained in:
12
src/init.cpp
12
src/init.cpp
@@ -1000,11 +1000,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
|
||||
|
||||
Reference in New Issue
Block a user