]>
Commit | Line | Data |
---|---|---|
a20c0d0f PW |
1 | // Copyright (c) 2012 The Bitcoin developers |
2 | // Distributed under the MIT/X11 software license, see the accompanying | |
3a25a2b9 | 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. |
093303a8 | 4 | |
a20c0d0f PW |
5 | #ifndef BITCOIN_VERSION_H |
6 | #define BITCOIN_VERSION_H | |
7 | ||
f8759211 | 8 | #include "clientversion.h" |
51ed9ec9 | 9 | |
a20c0d0f | 10 | #include <string> |
6e5fd003 | 11 | #include <vector> |
a20c0d0f | 12 | |
b87c0fc4 JG |
13 | // |
14 | // client versioning | |
15 | // | |
16 | ||
b87c0fc4 JG |
17 | static const int CLIENT_VERSION = |
18 | 1000000 * CLIENT_VERSION_MAJOR | |
f8759211 | 19 | + 10000 * CLIENT_VERSION_MINOR |
b87c0fc4 JG |
20 | + 100 * CLIENT_VERSION_REVISION |
21 | + 1 * CLIENT_VERSION_BUILD; | |
22 | ||
a20c0d0f PW |
23 | extern const std::string CLIENT_NAME; |
24 | extern const std::string CLIENT_BUILD; | |
25 | extern const std::string CLIENT_DATE; | |
b87c0fc4 JG |
26 | |
27 | // | |
28 | // network protocol versioning | |
29 | // | |
30 | ||
70352e11 | 31 | static const int PROTOCOL_VERSION = 70002; |
a20c0d0f | 32 | |
ab651b2d | 33 | // initial proto version, to be increased after version/verack negotiation |
1ce41892 WT |
34 | static const int INIT_PROTO_VERSION = 209; |
35 | ||
36 | // disconnect from peers older than this proto version | |
37 | static const int MIN_PEER_PROTO_VERSION = 209; | |
8b09cd3a JG |
38 | |
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; | |
42 | ||
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; | |
46 | ||
93e447b6 | 47 | // BIP 0031, pong message, is enabled for all versions AFTER this one |
b87c0fc4 | 48 | static const int BIP0031_VERSION = 60000; |
93e447b6 | 49 | |
ab651b2d | 50 | // "mempool" command, enhanced "getdata" behavior starts with this version |
05a85b2b JG |
51 | static const int MEMPOOL_GD_VERSION = 60002; |
52 | ||
6e5fd003 WL |
53 | std::string FormatFullVersion(); |
54 | std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments); | |
55 | ||
093303a8 | 56 | #endif // BITCOIN_VERSION_H |