From a0158e66f22b226e10f875a4f7957f2fe6311452 Mon Sep 17 00:00:00 2001 From: TrianglesCommunityProject Date: Thu, 28 Aug 2014 15:34:57 +0200 Subject: [PATCH] Cheops Release Fix 1 Version 3.4.2.0. - reverted previous idiocy --- src/clientversion.h | 2 +- src/kernel.cpp | 7 ++----- src/version.h | 10 +++++----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/clientversion.h b/src/clientversion.h index c3732f3..bae143b 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 3 #define CLIENT_VERSION_MINOR 4 -#define CLIENT_VERSION_REVISION 1 +#define CLIENT_VERSION_REVISION 2 #define CLIENT_VERSION_BUILD 0 // Converts the parameter X to a string after macro replacement on X has been performed. diff --git a/src/kernel.cpp b/src/kernel.cpp index 88df4f6..d9dd3ed 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -296,11 +296,8 @@ bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned // v0.3 protocol kernel hash weight starts from 0 at the min age // this change increases active coins participating the hash and helps // to secure the network when proof-of-stake difficulty is low - - // triangles: fixed timeweight calculation - //old: int64 nTimeWeight = min((int64)nTimeTx - txPrev.nTime, (int64)nStakeMaxAge) - nStakeMinAge; - int64 nTimeWeight = min((int64)nTimeTx - txPrev.nTime - nStakeMinAge, (int64)nStakeMaxAge); - CBigNum bnCoinDayWeight = CBigNum(nValueIn) * nTimeWeight / COIN / (24 * 60 * 60); + int64 nTimeWeight = min((int64)nTimeTx - txPrev.nTime, (int64)nStakeMaxAge) - nStakeMinAge; + CBigNum bnCoinDayWeight = CBigNum(nValueIn) * nTimeWeight / COIN / (24 * 60 * 6); // printf(">>> CheckStakeKernelHash: nTimeWeight = %"PRI64d"\n", nTimeWeight); // Calculate hash diff --git a/src/version.h b/src/version.h index a22bdaa..551de04 100644 --- a/src/version.h +++ b/src/version.h @@ -24,18 +24,18 @@ extern const std::string CLIENT_DATE; // // network protocol versioning // -static const int PROTOCOL_VERSION = 70200; +static const int PROTOCOL_VERSION = 70201; // earlier versions not supported as of Aug 2014, and are disconnected -static const int MIN_PROTO_VERSION = 70200; +static const int MIN_PROTO_VERSION = 70201; // nTime field added to CAddress, starting with this version; // if possible, avoid requesting addresses nodes older than this -static const int CADDR_TIME_VERSION = 70101; +static const int CADDR_TIME_VERSION = 70200; // only request blocks from nodes outside this range of versions static const int NOBLKS_VERSION_START = 0; -static const int NOBLKS_VERSION_END = 70101; +static const int NOBLKS_VERSION_END = 70200; // BIP 0031, pong message, is enabled for all versions AFTER this one static const int BIP0031_VERSION = 60000; @@ -45,7 +45,7 @@ static const int MEMPOOL_GD_VERSION = 60002; #define DISPLAY_VERSION_MAJOR 3 #define DISPLAY_VERSION_MINOR 4 -#define DISPLAY_VERSION_REVISION 1 +#define DISPLAY_VERSION_REVISION 2 #define DISPLAY_VERSION_BUILD 0 #endif