diff options
| author | Peter Todd <[email protected]> | 2013-10-20 22:36:31 -0400 |
|---|---|---|
| committer | langerhans <[email protected]> | 2015-08-28 20:45:39 +0200 |
| commit | acb08f053aa80e96531662d6fcb784285d8b1d19 (patch) | |
| tree | 39f9643b72f69b2d6411c0d0085910ef07b5b9f7 /src/init.cpp | |
| parent | Merge pull request #1247 from rnicoll/1.10-attribution (diff) | |
| download | discoin-acb08f053aa80e96531662d6fcb784285d8b1d19.tar.xz discoin-acb08f053aa80e96531662d6fcb784285d8b1d19.zip | |
Add NODE_BLOOM service bit and bump protocol version
Lets nodes advertise that they offer bloom filter support explicitly.
The protocol version bump allows SPV nodes to assume that NODE_BLOOM is
set if NODE_NETWORK is set for pre-70002 nodes.
Also adds an undocumented option to turn bloom filter support off for
testing purposes. Nodes attempting to use bloom filters are immediately
dropped so as to not waste their bandwidth.
ensure backward compatible service bits
update protocol version to 70004
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 21a566848..b8ef781a8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -321,6 +321,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), 1)); strUsage += HelpMessageOpt("-seednode=<ip>", _("Connect to a node to retrieve peer addresses, and disconnect")); strUsage += HelpMessageOpt("-timeout=<n>", strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT)); + strUsage += HelpMessageOpt("-bloomfilters", _("Allow peers to set bloom filters (default: 1)")); #ifdef USE_UPNP #if USE_UPNP strUsage += HelpMessageOpt("-upnp", _("Use UPnP to map the listening port (default: 1 when listening)")); @@ -669,6 +670,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) fLogTimestamps = GetBoolArg("-logtimestamps", true); fLogIPs = GetBoolArg("-logips", false); + fBloomFilters = GetBoolArg("-bloomfilters", true); + if (fBloomFilters) { + nLocalServices |= NODE_BLOOM; + } + // when specifying an explicit binding address, you want to listen on it // even when -connect or -proxy is specified if (mapArgs.count("-bind")) { |