diff --git a/aquariuscoin-qt.pro b/aquariuscoin-qt.pro index bc9e3da1c7..98e5adcdec 100644 --- a/aquariuscoin-qt.pro +++ b/aquariuscoin-qt.pro @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = aquariuscoin-qt -VERSION = 2.0.0 +VERSION = 2.0.1 INCLUDEPATH += src src/json src/qt QT += network DEFINES += ENABLE_WALLET diff --git a/src/clientversion.h b/src/clientversion.h index 582a017c71..b19ecff85a 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -8,7 +8,7 @@ // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 2 #define CLIENT_VERSION_MINOR 0 -#define CLIENT_VERSION_REVISION 0 +#define CLIENT_VERSION_REVISION 1 #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build diff --git a/src/main.cpp b/src/main.cpp index 9ec6f58fbc..b02be2e51a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2008,9 +2008,16 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckSig) c return DoS(50, error("CheckBlock() : proof of work failed")); // Check timestamp - if (GetBlockTime() > FutureDriftV1(GetAdjustedTime())) - return error("CheckBlock() : block timestamp too far in the future"); - + if (IsProtocolV4(nTime)) + { + if (GetBlockTime() > (FutureDriftV2(GetAdjustedTime()))) + return error("CheckBlock() : block timestamp too far in the future"); + } + else + { + if (GetBlockTime() > (FutureDriftV1(GetAdjustedTime()))) + return error("CheckBlock() : block timestamp too far in the future"); + } // First transaction must be coinbase, the rest must not be if (vtx.empty() || !vtx[0].IsCoinBase()) return DoS(100, error("CheckBlock() : first tx is not coinbase")); diff --git a/src/main.h b/src/main.h index a85cc67327..0cf678986c 100644 --- a/src/main.h +++ b/src/main.h @@ -58,6 +58,7 @@ static const int64_t COIN_YEAR_REWARD2 = 6 * CENT; // fork at block 70000 = IsR inline bool IsRewardHF(int nHeight) { return TestNet() || nHeight > 70000; } // initialize fixed 1 COIN (with halving) + 6% reward inline bool IsProtocolV2(int nHeight) { return TestNet() || nHeight > 589289; } // 589289 ARCO HardFork to v2 Protocol inline bool IsProtocolV3(int64_t nTime) { return TestNet() || nTime > 1489900000; } // 1489900000 GMT: Sun, 19 Mar 2017 05:06:40 GMT +inline bool IsProtocolV4(int64_t nTime) { return TestNet() || nTime > 1501700400; } // future drift fix, (GMT): Wednesday, August 2, 2017 7:00:00 PM inline int64_t FutureDriftV1(int64_t nTime) { return nTime + 10 * 60; } inline int64_t FutureDriftV2(int64_t nTime) { return nTime + 15; } diff --git a/src/version.h b/src/version.h index 98b4b000dc..d9bbbb5b90 100644 --- a/src/version.h +++ b/src/version.h @@ -30,13 +30,13 @@ static const int DATABASE_VERSION = 70510; // network protocol versioning // -static const int PROTOCOL_VERSION = 60015; +static const int PROTOCOL_VERSION = 60016; // intial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; // disconnect from peers older than this proto version -static const int MIN_PEER_PROTO_VERSION = 60014; +static const int MIN_PEER_PROTO_VERSION = 60015; // nTime field added to CAddress, starting with this version; // if possible, avoid requesting addresses nodes older than this