Commit 2cf48571 authored by Ashot's avatar Ashot

Added new spork to disable/enable masternode payments

parent a2bbf768
Pipeline #896 failed with stage
in 54 minutes and 26 seconds
variables:
RELEASE_VERSION: "0.12.7.2"
RELEASE_VERSION: "0.12.7.3"
GIT_STRATEGY: "clone"
MAKEJOBS: "-j4"
CCACHE_SIZE: "100M"
......
......@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 12)
define(_CLIENT_VERSION_REVISION, 7)
define(_CLIENT_VERSION_BUILD, 2)
define(_CLIENT_VERSION_BUILD, 3)
define(_COPYRIGHT_YEAR, 2018)
AC_INIT([Crown Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[[email protected]],[crown])
AC_CONFIG_SRCDIR([src/main.cpp])
......
......@@ -17,7 +17,7 @@
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 12
#define CLIENT_VERSION_REVISION 7
#define CLIENT_VERSION_BUILD 2
#define CLIENT_VERSION_BUILD 3
/**
* Copyright year (2009-this)
......
......@@ -3291,7 +3291,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
if(nHeight != 0){
//Require no masternode payments if the spork is disabled, this is required to make sure no stakepointers are
//given to non masternode/systemnodes
if (nHeight >= Params().PoSStartHeight() && !IsSporkActive(SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT)) {
if (nHeight >= Params().PoSStartHeight() && !IsSporkActive(SPORK_4_ENABLE_MASTERNODE_PAYMENTS)) {
//Don't consider this invalid if the blockchain is not synced. Add exception for jumpstart, which forces sync to return true.
if (masternodeSync.IsSynced() && !GetBoolArg("-jumpstart", false) && block.vtx[0].vout.size() > 1)
return state.DoS(100,
......
......@@ -369,7 +369,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn, CWallet* pwallet,
}
// Masternode and general budget payments
if (IsSporkActive(SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT)) {
if (IsSporkActive(SPORK_4_ENABLE_MASTERNODE_PAYMENTS)) {
FillBlockPayee(txCoinbase, nFees);
SNFillBlockPayee(txCoinbase, nFees);
}
......
......@@ -84,6 +84,7 @@ bool IsSporkActive(int nSporkID)
} else {
if(nSporkID == SPORK_2_INSTANTX) r = SPORK_2_INSTANTX_DEFAULT;
if(nSporkID == SPORK_3_INSTANTX_BLOCK_FILTERING) r = SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT;
if(nSporkID == SPORK_4_ENABLE_MASTERNODE_PAYMENTS) r = SPORK_4_ENABLE_MASTERNODE_PAYMENTS_DEFAULT;
if(nSporkID == SPORK_5_MAX_VALUE) r = SPORK_5_MAX_VALUE_DEFAULT;
if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT;
if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
......@@ -113,6 +114,7 @@ int64_t GetSporkValue(int nSporkID)
} else {
if(nSporkID == SPORK_2_INSTANTX) r = SPORK_2_INSTANTX_DEFAULT;
if(nSporkID == SPORK_3_INSTANTX_BLOCK_FILTERING) r = SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT;
if(nSporkID == SPORK_4_ENABLE_MASTERNODE_PAYMENTS) r = SPORK_4_ENABLE_MASTERNODE_PAYMENTS_DEFAULT;
if(nSporkID == SPORK_5_MAX_VALUE) r = SPORK_5_MAX_VALUE_DEFAULT;
if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT;
if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
......@@ -273,6 +275,7 @@ int CSporkManager::GetSporkIDByName(std::string strName)
{
if(strName == "SPORK_2_INSTANTX") return SPORK_2_INSTANTX;
if(strName == "SPORK_3_INSTANTX_BLOCK_FILTERING") return SPORK_3_INSTANTX_BLOCK_FILTERING;
if(strName == "SPORK_4_ENABLE_MASTERNODE_PAYMENTS") return SPORK_4_ENABLE_MASTERNODE_PAYMENTS;
if(strName == "SPORK_5_MAX_VALUE") return SPORK_5_MAX_VALUE;
if(strName == "SPORK_7_MASTERNODE_SCANNING") return SPORK_7_MASTERNODE_SCANNING;
if(strName == "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT") return SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT;
......@@ -292,6 +295,7 @@ std::string CSporkManager::GetSporkNameByID(int id)
{
if(id == SPORK_2_INSTANTX) return "SPORK_2_INSTANTX";
if(id == SPORK_3_INSTANTX_BLOCK_FILTERING) return "SPORK_3_INSTANTX_BLOCK_FILTERING";
if(id == SPORK_4_ENABLE_MASTERNODE_PAYMENTS) return "SPORK_4_ENABLE_MASTERNODE_PAYMENTS";
if(id == SPORK_5_MAX_VALUE) return "SPORK_5_MAX_VALUE";
if(id == SPORK_7_MASTERNODE_SCANNING) return "SPORK_7_MASTERNODE_SCANNING";
if(id == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) return "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT";
......
......@@ -28,6 +28,7 @@ using namespace boost;
#define SPORK_2_INSTANTX 10001
#define SPORK_3_INSTANTX_BLOCK_FILTERING 10002
#define SPORK_4_ENABLE_MASTERNODE_PAYMENTS 10003
#define SPORK_5_MAX_VALUE 10004
#define SPORK_7_MASTERNODE_SCANNING 10006
#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT 10007
......@@ -42,6 +43,7 @@ using namespace boost;
#define SPORK_2_INSTANTX_DEFAULT 978307200 //2001-1-1
#define SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT 1424217600 //2015-2-18
#define SPORK_4_ENABLE_MASTERNODE_PAYMENTS_DEFAULT 4070908800
#define SPORK_5_MAX_VALUE_DEFAULT 10000 //10000 CRW
#define SPORK_7_MASTERNODE_SCANNING_DEFAULT 978307200 //2001-1-1
#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //OFF
......
......@@ -9,8 +9,8 @@
/**
* network protocol versioning
*/
static const int PROTOCOL_VERSION = 71055;
static const int PROTOCOL_POS_START = 71055;
static const int PROTOCOL_VERSION = 71056;
static const int PROTOCOL_POS_START = 71056;
//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment