aboutsummaryrefslogtreecommitdiff
path: root/src/version.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2015-08-20 21:15:27 -0700
committerMatt Corallo <git@bluematt.me>2015-09-05 23:29:13 -0700
commitafb0ccaf9c9e4e8fac7db3564c4e19c9218c6b03 (patch)
tree14e3b07e6ed8886d97624d73767445b69f6dcb4b /src/version.h
parent536207f3167daad1fa3d60a1de7d9cb55db28ac9 (diff)
downloadbitcoin-afb0ccaf9c9e4e8fac7db3564c4e19c9218c6b03.tar.xz
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-70011 nodes. Also adds an option to turn bloom filter support off for nodes which advertise a version number >= 70011. Nodes attempting to use bloom filters on such protocol versions are banned, and a later upgade should drop nodes of an older version which attempt to use bloom filters. Much code stolen from Peter Todd. Implements BIP 111
Diffstat (limited to 'src/version.h')
-rw-r--r--src/version.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/version.h b/src/version.h
index 38b3d2e734..6cdddf9255 100644
--- a/src/version.h
+++ b/src/version.h
@@ -9,7 +9,7 @@
* network protocol versioning
*/
-static const int PROTOCOL_VERSION = 70002;
+static const int PROTOCOL_VERSION = 70011;
//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
@@ -34,4 +34,7 @@ static const int BIP0031_VERSION = 60000;
//! "mempool" command, enhanced "getdata" behavior starts with this version
static const int MEMPOOL_GD_VERSION = 60002;
+//! "filter*" commands are disabled without NODE_BLOOM after and including this version
+static const int NO_BLOOM_VERSION = 70011;
+
#endif // BITCOIN_VERSION_H