aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-12-16 16:26:14 -0500
committerGavin Andresen <gavinandresen@gmail.com>2011-12-19 10:24:23 -0500
commitf8ded588a2f78ac2767a60c716a7d15c273b4fc7 (patch)
treef8bb01303f5feb0bf04a8fb01ada04b58304a207 /src/main.h
parent8896c2d9d64d71e25b31d7a389f0b8db49a1e50a (diff)
Implement BIP 14 : separate protocol version from client version
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.h b/src/main.h
index 3870cee864..e519ef6551 100644
--- a/src/main.h
+++ b/src/main.h
@@ -27,6 +27,10 @@ class CRequestTracker;
class CNode;
class CBlockIndex;
+static const int CLIENT_VERSION = 59900;
+static const bool VERSION_IS_BETA = true;
+extern const std::string CLIENT_NAME;
+
static const unsigned int MAX_BLOCK_SIZE = 1000000;
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
static const int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
@@ -1521,6 +1525,7 @@ public:
bool AppliesTo(int nVersion, std::string strSubVerIn) const
{
+ // TODO: rework for client-version-embedded-in-strSubVer ?
return (IsInEffect() &&
nMinVer <= nVersion && nVersion <= nMaxVer &&
(setSubVer.empty() || setSubVer.count(strSubVerIn)));
@@ -1528,7 +1533,7 @@ public:
bool AppliesToMe() const
{
- return AppliesTo(VERSION, ::pszSubVer);
+ return AppliesTo(PROTOCOL_VERSION, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<std::string>()));
}
bool RelayTo(CNode* pnode) const