Skip to content

Commit

Permalink
Deprecate spork_11.
Browse files Browse the repository at this point in the history
Github-Merge: PIVX-Project#405
Rebased-From: 8469261
  • Loading branch information
presstab authored and Fuzzbawls committed Nov 29, 2017
1 parent 77583c4 commit 37a39fc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,12 @@ class CMainParams : public CChainParams
nLastPOWBlock = 259200;
nModifierUpdateBlock = 615800;
nZerocoinStartHeight = 863787;
nZerocoinStartTime = 1508214600; // October 17, 2017 4:30:00 AM
nBlockEnforceSerialRange = 895400; //Enforce serial range starting this block
nBlockRecalculateAccumulators = 908000; //Trigger a recalculation of accumulators
nBlockFirstFraudulent = 891737; //First block that bad serials emerged
nBlockLastGoodCheckpoint = 891730; //Last valid accumulator checkpoint
nZerocoinStartTime = 1508214600; // October 17, 2017 4:30:00 AM
nBlockEnforceInvalidUTXO = 902850; //Start enforcing the invalid UTXO's

/**
* Build the genesis block. Note that the output of the genesis coinbase cannot
Expand Down Expand Up @@ -257,6 +258,7 @@ class CTestNetParams : public CMainParams
nBlockRecalculateAccumulators = 9908000; //Trigger a recalculation of accumulators
nBlockFirstFraudulent = 9891737; //First block that bad serials emerged
nBlockLastGoodCheckpoint = 9891730; //Last valid accumulator checkpoint
nBlockEnforceInvalidUTXO = 9902850; //Start enforcing the invalid UTXO's

//! Modify the testnet genesis block so the timestamp is valid for a later start.
genesis.nTime = 1454124731;
Expand Down Expand Up @@ -296,7 +298,7 @@ class CTestNetParams : public CMainParams
strSporkKey = "04348C2F50F90267E64FACC65BFDC9D0EB147D090872FB97ABAE92E9A36E6CA60983E28E741F8E7277B11A7479B626AC115BA31463AC48178A5075C5A9319D4A38";
strObfuscationPoolDummyAddress = "y57cqfGRkekRyDRNeJiLtYVEbvhXrNbmox";
nStartMasternodePayments = 1420837558; //Fri, 09 Jan 2015 21:05:58 GMT
nBudget_Fee_Confirmations = 3; // Number of confirmations for the finalization fee. We have to make this very short
nBudget_Fee_Confirmations = 3; // Number of confirmations for the finalization fee. We have to make this very short
// here because we only have a 8 block finalization window on testnet
}
const Checkpoints::CCheckpointData& Checkpoints() const
Expand Down
5 changes: 4 additions & 1 deletion src/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class CChainParams
int Zerocoin_Block_FirstFraudulent() const { return nBlockFirstFraudulent; }
int Zerocoin_Block_LastGoodCheckpoint() const { return nBlockLastGoodCheckpoint; }
int Zerocoin_StartTime() const { return nZerocoinStartTime; }
int Block_Enforce_Invalid() const { return nBlockEnforceInvalidUTXO; }

protected:
CChainParams() {}
Expand Down Expand Up @@ -167,11 +168,13 @@ class CChainParams
int nZerocoinHeaderVersion;
int64_t nBudget_Fee_Confirmations;
int nZerocoinStartHeight;
int nZerocoinStartTime;

int nBlockEnforceSerialRange;
int nBlockRecalculateAccumulators;
int nBlockFirstFraudulent;
int nBlockLastGoodCheckpoint;
int nZerocoinStartTime;
int nBlockEnforceInvalidUTXO;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2778,7 +2778,7 @@ void PopulateInvalidOutPointMap()

bool ValidOutPoint(const COutPoint out, int nHeight)
{
bool isInvalid = nHeight >= GetSporkValue(SPORK_11_LOCK_INVALID_UTXO) && mapInvalidOutPoints.count(out);
bool isInvalid = nHeight >= Params().Block_Enforce_Invalid() && mapInvalidOutPoints.count(out);
return !isInvalid;
}

Expand Down
3 changes: 0 additions & 3 deletions src/spork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ int64_t GetSporkValue(int nSporkID)
if (nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
if (nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
if (nSporkID == SPORK_10_MASTERNODE_PAY_UPDATED_NODES) r = SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT;
if (nSporkID == SPORK_11_LOCK_INVALID_UTXO) r = SPORK_11_LOCK_INVALID_UTXO_DEFAULT;
if (nSporkID == SPORK_13_ENABLE_SUPERBLOCKS) r = SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT;
if (nSporkID == SPORK_14_NEW_PROTOCOL_ENFORCEMENT) r = SPORK_14_NEW_PROTOCOL_ENFORCEMENT_DEFAULT;
if (nSporkID == SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2) r = SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2_DEFAULT;
Expand Down Expand Up @@ -264,7 +263,6 @@ int CSporkManager::GetSporkIDByName(std::string strName)
if (strName == "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT") return SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT;
if (strName == "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT") return SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT;
if (strName == "SPORK_10_MASTERNODE_PAY_UPDATED_NODES") return SPORK_10_MASTERNODE_PAY_UPDATED_NODES;
if (strName == "SPORK_11_LOCK_INVALID_UTXO") return SPORK_11_LOCK_INVALID_UTXO;
if (strName == "SPORK_13_ENABLE_SUPERBLOCKS") return SPORK_13_ENABLE_SUPERBLOCKS;
if (strName == "SPORK_14_NEW_PROTOCOL_ENFORCEMENT") return SPORK_14_NEW_PROTOCOL_ENFORCEMENT;
if (strName == "SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2") return SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2;
Expand All @@ -282,7 +280,6 @@ std::string CSporkManager::GetSporkNameByID(int id)
if (id == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) return "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT";
if (id == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) return "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT";
if (id == SPORK_10_MASTERNODE_PAY_UPDATED_NODES) return "SPORK_10_MASTERNODE_PAY_UPDATED_NODES";
if (id == SPORK_11_LOCK_INVALID_UTXO) return "SPORK_11_LOCK_INVALID_UTXO";
if (id == SPORK_13_ENABLE_SUPERBLOCKS) return "SPORK_13_ENABLE_SUPERBLOCKS";
if (id == SPORK_14_NEW_PROTOCOL_ENFORCEMENT) return "SPORK_14_NEW_PROTOCOL_ENFORCEMENT";
if (id == SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2) return "SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2";
Expand Down
4 changes: 2 additions & 2 deletions src/spork.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using namespace boost;
#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT 10007
#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT 10008
#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES 10009
#define SPORK_11_LOCK_INVALID_UTXO 10010
//#define SPORK_11_LOCK_INVALID_UTXO 10010
//#define SPORK_12_RECONSIDER_BLOCKS 10011
#define SPORK_13_ENABLE_SUPERBLOCKS 10012
#define SPORK_14_NEW_PROTOCOL_ENFORCEMENT 10013
Expand All @@ -50,7 +50,7 @@ using namespace boost;
#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT 4070908800 //OFF
#define SPORK_11_LOCK_INVALID_UTXO_DEFAULT 4070908800 //OFF - NOTE: this is block height not time!
//#define SPORK_11_LOCK_INVALID_UTXO_DEFAULT 4070908800 //OFF - NOTE: this is block height not time!
#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT 4070908800 //OFF
#define SPORK_14_NEW_PROTOCOL_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2_DEFAULT 4070908800 //OFF
Expand Down

0 comments on commit 37a39fc

Please sign in to comment.