@@ -152,17 +152,6 @@ libzerocoin::ZerocoinParams* CChainParams::Zerocoin_Params(bool useModulusV1) co
152152 return &ZCParamsDec;
153153}
154154
155- bool CChainParams::HasStakeMinAgeOrDepth (const int contextHeight, const uint32_t contextTime,
156- const int utxoFromBlockHeight, const uint32_t utxoFromBlockTime) const
157- {
158- // before stake modifier V2, the age required was 60 * 60 (1 hour).
159- if (!IsStakeModifierV2 (contextHeight))
160- return (utxoFromBlockTime + consensus.nStakeMinAge <= contextTime);
161-
162- // after stake modifier V2, we require the utxo to be nStakeMinDepth deep in the chain
163- return (contextHeight - utxoFromBlockHeight >= consensus.nStakeMinDepth );
164- }
165-
166155class CMainParams : public CChainParams
167156{
168157public:
@@ -189,6 +178,7 @@ class CMainParams : public CChainParams
189178 // height based activations
190179 consensus.height_last_PoW = 259200 ;
191180 consensus.height_start_BIP65 = 1808634 ; // 82629b7a9978f5c7ea3f70a12db92633a7d2e436711500db28b97efd48b1e527
181+ consensus.height_start_StakeModifierV2 = 1967000 ;
192182 consensus.height_start_TimeProtoV2 = 2153200 ; // TimeProtocolV2, Blocks V7 and newMessageSignatures
193183
194184 /* *
@@ -232,7 +222,6 @@ class CMainParams : public CChainParams
232222 nBlockDoubleAccumulated = 1050010 ;
233223 nEnforceNewSporkKey = 1566860400 ; // !> Sporks signed after Monday, August 26, 2019 11:00:00 PM GMT must use the new spork key
234224 nRejectOldSporkKey = 1569538800 ; // !> Fully reject old spork key after Thursday, September 26, 2019 11:00:00 PM GMT
235- nBlockStakeModifierlV2 = 1967000 ;
236225
237226 // Public coin spend enforcement
238227 nPublicZCSpends = 1880000 ;
@@ -335,6 +324,7 @@ class CTestNetParams : public CMainParams
335324 // height based activations
336325 consensus.height_last_PoW = 200 ;
337326 consensus.height_start_BIP65 = 851019 ;
327+ consensus.height_start_StakeModifierV2 = 1214000 ;
338328 consensus.height_start_TimeProtoV2 = 1347000 ; // TimeProtocolV2, Blocks V7 and newMessageSignatures
339329
340330 /* *
@@ -374,7 +364,6 @@ class CTestNetParams : public CMainParams
374364 nBlockZerocoinV2 = 444020 ; // !> The block that zerocoin v2 becomes active
375365 nEnforceNewSporkKey = 1566860400 ; // !> Sporks signed after Monday, August 26, 2019 11:00:00 PM GMT must use the new spork key
376366 nRejectOldSporkKey = 1569538800 ; // !> Reject old spork key after Thursday, September 26, 2019 11:00:00 PM GMT
377- nBlockStakeModifierlV2 = 1214000 ;
378367
379368 // Public coin spend enforcement
380369 nPublicZCSpends = 1106100 ;
@@ -461,6 +450,7 @@ class CRegTestParams : public CTestNetParams
461450 // height based activations
462451 consensus.height_last_PoW = 250 ;
463452 consensus.height_start_BIP65 = 851019 ; // Not defined for regtest. Inherit TestNet value.
453+ consensus.height_start_StakeModifierV2 = consensus.height_last_PoW + 1 ; // start with modifier V2 on regtest
464454 consensus.height_start_TimeProtoV2 = 999999999 ;
465455
466456
@@ -494,7 +484,6 @@ class CRegTestParams : public CTestNetParams
494484 nBlockRecalculateAccumulators = 999999999 ; // Trigger a recalculation of accumulators
495485 nBlockFirstFraudulent = 999999999 ; // First block that bad serials emerged
496486 nBlockLastGoodCheckpoint = 999999999 ; // Last valid accumulator checkpoint
497- nBlockStakeModifierlV2 = consensus.height_last_PoW + 1 ; // start with modifier V2 on regtest
498487
499488 nMintRequiredConfirmations = 10 ;
500489 nZerocoinRequiredStakeDepth = nMintRequiredConfirmations;
0 commit comments