version.h: separate client, net sections. Move more constants to this file.
* move PROTOCOL_VERSION to version.h * move CLIENT_VERSION* to version.h, make available past cpp stage * clearly separate client, network version portions of version.h
This commit is contained in:
parent
93e447b631
commit
b87c0fc440
3 changed files with 23 additions and 14 deletions
|
@ -20,6 +20,7 @@
|
||||||
#include <boost/tuple/tuple_io.hpp>
|
#include <boost/tuple/tuple_io.hpp>
|
||||||
|
|
||||||
#include "allocators.h"
|
#include "allocators.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
typedef long long int64;
|
typedef long long int64;
|
||||||
typedef unsigned long long uint64;
|
typedef unsigned long long uint64;
|
||||||
|
@ -29,8 +30,6 @@ class CDataStream;
|
||||||
class CAutoFile;
|
class CAutoFile;
|
||||||
static const unsigned int MAX_SIZE = 0x02000000;
|
static const unsigned int MAX_SIZE = 0x02000000;
|
||||||
|
|
||||||
static const int PROTOCOL_VERSION = 60000;
|
|
||||||
|
|
||||||
// Used to bypass the rule against non-const reference to temporary
|
// Used to bypass the rule against non-const reference to temporary
|
||||||
// where it makes sense with wrappers such as CFlatData or CTxDB
|
// where it makes sense with wrappers such as CFlatData or CTxDB
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
@ -11,18 +11,8 @@
|
||||||
const std::string CLIENT_NAME("Satoshi");
|
const std::string CLIENT_NAME("Satoshi");
|
||||||
|
|
||||||
// Client version number
|
// Client version number
|
||||||
#define CLIENT_VERSION_MAJOR 0
|
|
||||||
#define CLIENT_VERSION_MINOR 6
|
|
||||||
#define CLIENT_VERSION_REVISION 0
|
|
||||||
#define CLIENT_VERSION_BUILD 99
|
|
||||||
#define CLIENT_VERSION_SUFFIX "-beta"
|
#define CLIENT_VERSION_SUFFIX "-beta"
|
||||||
|
|
||||||
const int CLIENT_VERSION = 1000000 * CLIENT_VERSION_MAJOR
|
|
||||||
+ 10000 * CLIENT_VERSION_MINOR
|
|
||||||
+ 100 * CLIENT_VERSION_REVISION
|
|
||||||
+ 1 * CLIENT_VERSION_BUILD;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The following part of the code determines the CLIENT_BUILD variable.
|
// The following part of the code determines the CLIENT_BUILD variable.
|
||||||
// Several mechanisms are used for this:
|
// Several mechanisms are used for this:
|
||||||
|
|
|
@ -6,12 +6,32 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
//
|
||||||
|
// client versioning
|
||||||
|
//
|
||||||
|
|
||||||
|
static const int CLIENT_VERSION_MAJOR = 0;
|
||||||
|
static const int CLIENT_VERSION_MINOR = 6;
|
||||||
|
static const int CLIENT_VERSION_REVISION = 0;
|
||||||
|
static const int CLIENT_VERSION_BUILD = 99;
|
||||||
|
|
||||||
|
static const int CLIENT_VERSION =
|
||||||
|
1000000 * CLIENT_VERSION_MAJOR
|
||||||
|
+ 10000 * CLIENT_VERSION_MINOR
|
||||||
|
+ 100 * CLIENT_VERSION_REVISION
|
||||||
|
+ 1 * CLIENT_VERSION_BUILD;
|
||||||
|
|
||||||
extern const std::string CLIENT_NAME;
|
extern const std::string CLIENT_NAME;
|
||||||
extern const std::string CLIENT_BUILD;
|
extern const std::string CLIENT_BUILD;
|
||||||
extern const std::string CLIENT_DATE;
|
extern const std::string CLIENT_DATE;
|
||||||
extern const int CLIENT_VERSION;
|
|
||||||
|
//
|
||||||
|
// network protocol versioning
|
||||||
|
//
|
||||||
|
|
||||||
|
static const int PROTOCOL_VERSION = 60000;
|
||||||
|
|
||||||
// BIP 0031, pong message, is enabled for all versions AFTER this one
|
// BIP 0031, pong message, is enabled for all versions AFTER this one
|
||||||
const int BIP0031_VERSION = 60000;
|
static const int BIP0031_VERSION = 60000;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue