Browse Source

Enable NODE_BLOOM by default

Also change behavior to simply disconnect peers, rather than DoS-ban
them.
0.8
Peter Todd 11 years ago
parent
commit
3689088c6d
No known key found for this signature in database
GPG Key ID: 2481403DA5F091FB
  1. 4
      src/init.cpp
  2. 2
      src/main.cpp
  3. 2
      src/util.cpp

4
src/init.cpp

@ -317,7 +317,7 @@ std::string HelpMessage() @@ -317,7 +317,7 @@ std::string HelpMessage()
" -bantime=<n> " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n" +
" -maxreceivebuffer=<n> " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n" +
" -maxsendbuffer=<n> " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)") + "\n" +
" -bloomfilters " + _("Allow peers to set bloom filters (default: 0)") + "\n" +
" -bloomfilters " + _("Allow peers to set bloom filters (default: 1)") + "\n" +
#ifdef USE_UPNP
#if USE_UPNP
" -upnp " + _("Use UPnP to map the listening port (default: 1 when listening)") + "\n" +
@ -497,7 +497,7 @@ bool AppInit2(boost::thread_group& threadGroup) @@ -497,7 +497,7 @@ bool AppInit2(boost::thread_group& threadGroup)
// ********************************************************* Step 2: parameter interactions
fTestNet = GetBoolArg("-testnet");
fBloomFilters = GetBoolArg("-bloomfilters");
fBloomFilters = GetBoolArg("-bloomfilters", true);
if (fBloomFilters)
nLocalServices |= NODE_BLOOM;

2
src/main.cpp

@ -3718,7 +3718,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) @@ -3718,7 +3718,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
strCommand == "filteradd" ||
strCommand == "filterclear"))
{
pfrom->Misbehaving(100);
pfrom->CloseSocketDisconnect();
return error("peer %s attempted to set a bloom filter even though we do not advertise that service",
pfrom->addr.ToString().c_str());
}

2
src/util.cpp

@ -79,7 +79,7 @@ bool fServer = false; @@ -79,7 +79,7 @@ bool fServer = false;
bool fCommandLine = false;
string strMiscWarning;
bool fTestNet = false;
bool fBloomFilters = false;
bool fBloomFilters = true;
bool fNoListen = false;
bool fLogTimestamps = false;
CMedianFilter<int64> vTimeOffsets(200,0);

Loading…
Cancel
Save