Merge branch 'node-bloom-service-bit' of github.com:petertodd/bitcoin into bloom-todd
This commit is contained in:
commit
103a278443
|
@ -419,6 +419,11 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||
|
||||
// ********************************************************* Step 2: parameter interactions
|
||||
|
||||
fBloomFilters = GetBoolArg("-bloomfilters", true);
|
||||
if (fBloomFilters) {
|
||||
nLocalServices |= NODE_BLOOM;
|
||||
}
|
||||
|
||||
if (mapArgs.count("-bind")) {
|
||||
// when specifying an explicit binding address, you want to listen on it
|
||||
// even when -connect or -proxy is specified
|
||||
|
|
|
@ -4015,6 +4015,15 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
|||
}
|
||||
}
|
||||
|
||||
else if (!fBloomFilters &&
|
||||
(strCommand == "filterload" ||
|
||||
strCommand == "filteradd" ||
|
||||
strCommand == "filterclear"))
|
||||
{
|
||||
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());
|
||||
}
|
||||
|
||||
else if (strCommand == "filterload")
|
||||
{
|
||||
|
|
|
@ -94,6 +94,7 @@ bool fPrintToDebugLog = true;
|
|||
bool fDaemon = false;
|
||||
bool fServer = false;
|
||||
string strMiscWarning;
|
||||
bool fBloomFilters = true;
|
||||
bool fNoListen = false;
|
||||
bool fLogTimestamps = false;
|
||||
volatile bool fReopenDebugLog = false;
|
||||
|
|
|
@ -114,6 +114,7 @@ extern bool fPrintToConsole;
|
|||
extern bool fPrintToDebugLog;
|
||||
extern bool fServer;
|
||||
extern std::string strMiscWarning;
|
||||
extern bool fBloomFilters;
|
||||
extern bool fNoListen;
|
||||
extern bool fLogTimestamps;
|
||||
extern volatile bool fReopenDebugLog;
|
||||
|
|
|
@ -27,7 +27,7 @@ extern const std::string CLIENT_DATE;
|
|||
// network protocol versioning
|
||||
//
|
||||
|
||||
static const int PROTOCOL_VERSION = 70001;
|
||||
static const int PROTOCOL_VERSION = 70002;
|
||||
|
||||
// intial proto version, to be increased after version/verack negotiation
|
||||
static const int INIT_PROTO_VERSION = 209;
|
||||
|
|
Loading…
Reference in a new issue