diff --git a/configure.ac b/configure.ac index 9fe3dd282..f3dbaf251 100755 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 4) define(_CLIENT_VERSION_MINOR, 6) -define(_CLIENT_VERSION_REVISION, 1) +define(_CLIENT_VERSION_REVISION, 2) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2020) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 207bb3b2d..0187b4e94 100755 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -71,7 +71,9 @@ static Checkpoints::MapCheckpoints mapCheckpoints = (1529400,uint256("2e2f9fc719f478a532177f57c56345502539aeb37ba45b8147fbdf53f15f628f")) (1540850,uint256("ad53c70beb0dde7fe7c291cbdc5382c29d011d946edf14adf8274db765213c48")) (1594800,uint256("35d628c9471ff3d2b98d327a87b69669b219e5c473c0ccd54d6db84198b38819")) - (1797000,uint256("3222dfdda3b2c842eaff173e3a632964d56c3f5a957d0b444af2df07dd06754d")); + (1797000,uint256("3222dfdda3b2c842eaff173e3a632964d56c3f5a957d0b444af2df07dd06754d")) + (2000016,uint256("Fed89c61b9c7e19593c259344eb5d8a3121fd7f516d2cca31499a28f68af73b7")) + (2050000,uint256("6f89ed36393384b07325b96e54b59abdd8a1803b98b1ccaae14cc80c8912395e")); static const Checkpoints::CCheckpointData data = { &mapCheckpoints, diff --git a/src/clientversion.h b/src/clientversion.h index 510df2499..a476a234a 100755 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -16,7 +16,7 @@ //! These need to be macros, as clientversion.cpp's and vitae*-res.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 4 #define CLIENT_VERSION_MINOR 6 -#define CLIENT_VERSION_REVISION 1 +#define CLIENT_VERSION_REVISION 2 #define CLIENT_VERSION_BUILD 0 //! Set to true for release, false for prerelease or test build diff --git a/src/kernel.cpp b/src/kernel.cpp index 992df343a..81c3611d5 100755 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -492,7 +492,7 @@ bool CheckProofOfStake(const CBlock& block, uint256& hashProofOfStake, std::uniq const int nHeightBlockFrom = pindexFrom->nHeight; const uint32_t nTimeBlockFrom = pindexFrom->nTime; - if (!txin.IsZerocoinSpend()) { + if (!txin.IsZerocoinSpend() && ((nPreviousBlockHeight + 1) >= GetSporkValue(SPORK_26_MINIMUM_STAKE_AGE_BLOCK))) { if(! Params().HasStakeMinAgeOrDepth(nPreviousBlockHeight + 1, block.nTime, nHeightBlockFrom, nTimeBlockFrom, getStakeModifierV2SporkValue())) return error("%s : min age violation - height=%d - time=%d, nHeightBlockFrom=%d, nTimeBlockFrom=%d", __func__, nPreviousBlockHeight + 1, block.nTime, nHeightBlockFrom, nTimeBlockFrom); diff --git a/src/main.cpp b/src/main.cpp index fbfd76ced..930a25c5e 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -2005,7 +2005,7 @@ CAmount GetSeeSaw(int nHeight, int64_t blockValue){ int nMasternodeCount = 0 ; //if a mn count is inserted into the function we are looking for a specific result for a masternode count - if (IsSporkActive(SPORK_25_NEW_PROTOCOL_ENFORCEMENT_6)) + if (IsSporkActive(SPORK_27_NEW_PROTOCOL_ENFORCEMENT_7)) nMasternodeCount = m_nodeman.CountMasternodesAboveProtocol(MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT); else nMasternodeCount = m_nodeman.CountMasternodesAboveProtocol(MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT); @@ -6733,7 +6733,7 @@ int ActiveProtocol() // SPORK_25 is used for 71026. Nodes < 71026 won't see it and still get their protocol version via SPORK_14 and their // own ModifierUpgradeBlock() - if (IsSporkActive(SPORK_25_NEW_PROTOCOL_ENFORCEMENT_6)) + if (IsSporkActive(SPORK_27_NEW_PROTOCOL_ENFORCEMENT_7)) return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT; return MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT; } diff --git a/src/spork.cpp b/src/spork.cpp index 6e1643371..5341e091c 100755 --- a/src/spork.cpp +++ b/src/spork.cpp @@ -147,6 +147,8 @@ int64_t GetSporkValue(int nSporkID) if (nSporkID == SPORK_23_TIME_PROTOCOL_V2_BLOCK) r = SPORK_23_TIME_PROTOCOL_V2_BLOCK_DEFAULT; if (nSporkID == SPORK_24_STAKE_MODIFIER_V2_BLOCK) r = SPORK_24_STAKE_MODIFIER_V2_BLOCK_DEFAULT; if (nSporkID == SPORK_25_NEW_PROTOCOL_ENFORCEMENT_6) r = SPORK_25_NEW_PROTOCOL_ENFORCEMENT_6_DEFAULT; + if (nSporkID == SPORK_26_MINIMUM_STAKE_AGE_BLOCK) r = SPORK_26_MINIMUM_STAKE_AGE_BLOCK_DEFAULT; + if (nSporkID == SPORK_27_NEW_PROTOCOL_ENFORCEMENT_7) r = SPORK_27_NEW_PROTOCOL_ENFORCEMENT_7_DEFAULT; if (r == -1) LogPrintf("%s : Unknown Spork %d\n", __func__, nSporkID); } @@ -303,6 +305,8 @@ int CSporkManager::GetSporkIDByName(std::string strName) if (strName == "SPORK_23_TIME_PROTOCOL_V2_BLOCK") return SPORK_23_TIME_PROTOCOL_V2_BLOCK; if (strName == "SPORK_24_STAKE_MODIFIER_V2_BLOCK") return SPORK_24_STAKE_MODIFIER_V2_BLOCK; if (strName == "SPORK_25_NEW_PROTOCOL_ENFORCEMENT_6") return SPORK_25_NEW_PROTOCOL_ENFORCEMENT_6; + if (strName == "SPORK_26_MINIMUM_STAKE_AGE_BLOCK") return SPORK_26_MINIMUM_STAKE_AGE_BLOCK; + if (strName == "SPORK_27_NEW_PROTOCOL_ENFORCEMENT_7") return SPORK_27_NEW_PROTOCOL_ENFORCEMENT_7; return -1; } @@ -329,6 +333,8 @@ std::string CSporkManager::GetSporkNameByID(int id) if (id == SPORK_23_TIME_PROTOCOL_V2_BLOCK) return "SPORK_23_TIME_PROTOCOL_V2_BLOCK"; if (id == SPORK_24_STAKE_MODIFIER_V2_BLOCK) return "SPORK_24_STAKE_MODIFIER_V2_BLOCK"; if (id == SPORK_25_NEW_PROTOCOL_ENFORCEMENT_6) return "SPORK_25_NEW_PROTOCOL_ENFORCEMENT_6"; + if (id == SPORK_26_MINIMUM_STAKE_AGE_BLOCK) return "SPORK_26_MINIMUM_STAKE_AGE_BLOCK"; + if (id == SPORK_27_NEW_PROTOCOL_ENFORCEMENT_7) return "SPORK_27_NEW_PROTOCOL_ENFORCEMENT_7"; return "Unknown"; } diff --git a/src/spork.h b/src/spork.h index 92893367e..ae82cea27 100755 --- a/src/spork.h +++ b/src/spork.h @@ -29,7 +29,7 @@ using namespace boost; Sporks 11,12, and 16 to be removed with 1st zerocoin release */ #define SPORK_START 10001 -#define SPORK_END 10024 +#define SPORK_END 10026 #define SPORK_2_SWIFTTX 10001 #define SPORK_3_SWIFTTX_BLOCK_FILTERING 10002 @@ -53,6 +53,8 @@ using namespace boost; #define SPORK_23_TIME_PROTOCOL_V2_BLOCK 10022 #define SPORK_24_STAKE_MODIFIER_V2_BLOCK 10023 #define SPORK_25_NEW_PROTOCOL_ENFORCEMENT_6 10024 +#define SPORK_26_MINIMUM_STAKE_AGE_BLOCK 10025 +#define SPORK_27_NEW_PROTOCOL_ENFORCEMENT_7 10026 #define SPORK_2_SWIFTTX_DEFAULT 978307200 //2001-1-1 #define SPORK_3_SWIFTTX_BLOCK_FILTERING_DEFAULT 1424217600 //2015-2-18 @@ -75,6 +77,8 @@ using namespace boost; #define SPORK_23_TIME_PROTOCOL_V2_BLOCK_DEFAULT 9999999999 //OFF #define SPORK_24_STAKE_MODIFIER_V2_BLOCK_DEFAULT 9999999999 //OFF #define SPORK_25_NEW_PROTOCOL_ENFORCEMENT_6_DEFAULT 9999999999 //OFF +#define SPORK_26_MINIMUM_STAKE_AGE_BLOCK_DEFAULT 9999999999 //OFF +#define SPORK_27_NEW_PROTOCOL_ENFORCEMENT_7_DEFAULT 9999999999 //OFF class CSporkMessage; class CSporkManager;