1 // Copyright (c) 2012 The Bitcoin developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_VERSION_H
6 #define BITCOIN_VERSION_H
8 #include "clientversion.h"
17 static const int CLIENT_VERSION =
18 1000000 * CLIENT_VERSION_MAJOR
19 + 10000 * CLIENT_VERSION_MINOR
20 + 100 * CLIENT_VERSION_REVISION
21 + 1 * CLIENT_VERSION_BUILD;
23 extern const std::string CLIENT_NAME;
24 extern const std::string CLIENT_BUILD;
25 extern const std::string CLIENT_DATE;
28 // network protocol versioning
31 static const int PROTOCOL_VERSION = 70002;
33 // initial proto version, to be increased after version/verack negotiation
34 static const int INIT_PROTO_VERSION = 209;
36 // disconnect from peers older than this proto version
37 static const int MIN_PEER_PROTO_VERSION = 209;
39 // nTime field added to CAddress, starting with this version;
40 // if possible, avoid requesting addresses nodes older than this
41 static const int CADDR_TIME_VERSION = 31402;
43 // only request blocks from nodes outside this range of versions
44 static const int NOBLKS_VERSION_START = 32000;
45 static const int NOBLKS_VERSION_END = 32400;
47 // BIP 0031, pong message, is enabled for all versions AFTER this one
48 static const int BIP0031_VERSION = 60000;
50 // "mempool" command, enhanced "getdata" behavior starts with this version
51 static const int MEMPOOL_GD_VERSION = 60002;
53 std::string FormatFullVersion();
54 std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
56 #endif // BITCOIN_VERSION_H