@@ -157,10 +157,10 @@ bool CChainParams::HasStakeMinAgeOrDepth(const int contextHeight, const uint32_t
157157{
158158 // before stake modifier V2, the age required was 60 * 60 (1 hour).
159159 if (!IsStakeModifierV2 (contextHeight))
160- return (utxoFromBlockTime + nStakeMinAge <= contextTime);
160+ return (utxoFromBlockTime + consensus. nStakeMinAge <= contextTime);
161161
162162 // after stake modifier V2, we require the utxo to be nStakeMinDepth deep in the chain
163- return (contextHeight - utxoFromBlockHeight >= nStakeMinDepth);
163+ return (contextHeight - utxoFromBlockHeight >= consensus. nStakeMinDepth );
164164}
165165
166166int CChainParams::FutureBlockTimeDrift (const int nHeight) const
@@ -196,8 +196,10 @@ class CMainParams : public CChainParams
196196 consensus.powLimit = ~uint256 (0 ) >> 20 ; // PIVX starting difficulty is 1 / 2^12
197197 consensus.posLimitV1 = ~uint256 (0 ) >> 24 ;
198198 consensus.posLimitV2 = ~uint256 (0 ) >> 20 ;
199- consensus.nMaxMoneyOut = 21000000 * COIN;
200199 consensus.nCoinbaseMaturity = 100 ;
200+ consensus.nMaxMoneyOut = 21000000 * COIN;
201+ consensus.nStakeMinAge = 60 * 60 ;
202+ consensus.nStakeMinDepth = 600 ;
201203 consensus.nTargetTimespan = 40 * 60 ;
202204 consensus.nTargetTimespanV2 = 30 * 60 ;
203205 consensus.nTargetSpacing = 1 * 60 ;
@@ -228,8 +230,6 @@ class CMainParams : public CChainParams
228230 nRejectBlockOutdatedMajority = 10260 ; // 95%
229231 nToCheckBlockUpgradeMajority = 10800 ; // Approximate expected amount of blocks in 7 days (1440*7.5)
230232 nMinerThreads = 0 ;
231- nStakeMinAge = 60 * 60 ; // 1 hour
232- nStakeMinDepth = 600 ;
233233 nFutureTimeDriftPoW = 7200 ;
234234 nFutureTimeDriftPoS = 180 ;
235235 nMasternodeCountDrift = 20 ;
@@ -345,6 +345,8 @@ class CTestNetParams : public CMainParams
345345 consensus.posLimitV2 = ~uint256 (0 ) >> 20 ;
346346 consensus.nCoinbaseMaturity = 15 ;
347347 consensus.nMaxMoneyOut = 43199500 * COIN;
348+ consensus.nStakeMinAge = 60 * 60 ;
349+ consensus.nStakeMinDepth = 100 ;
348350 consensus.nTargetTimespan = 40 * 60 ;
349351 consensus.nTargetTimespanV2 = 30 * 60 ;
350352 consensus.nTargetSpacing = 1 * 60 ;
@@ -378,7 +380,6 @@ class CTestNetParams : public CMainParams
378380 nLastPOWBlock = 200 ;
379381 nPivxBadBlockTime = 1489001494 ; // Skip nBit validation of Block 259201 per PR #915
380382 nPivxBadBlocknBits = 0x1e0a20bd ; // Skip nBit validation of Block 201 per PR #915
381- nStakeMinDepth = 100 ;
382383 nMasternodeCountDrift = 4 ;
383384 nModifierUpdateBlock = 51197 ; // approx Mon, 17 Apr 2017 04:00:00 GMT
384385 nZerocoinStartHeight = 201576 ;
@@ -469,6 +470,8 @@ class CRegTestParams : public CTestNetParams
469470 consensus.posLimitV2 = ~uint256 (0 ) >> 20 ;
470471 consensus.nCoinbaseMaturity = 100 ;
471472 consensus.nMaxMoneyOut = 43199500 * COIN;
473+ consensus.nStakeMinAge = 0 ;
474+ consensus.nStakeMinDepth = 0 ;
472475 consensus.nTargetTimespan = 40 * 60 ;
473476 consensus.nTargetTimespanV2 = 30 * 60 ;
474477 consensus.nTargetSpacing = 1 * 60 ;
@@ -500,8 +503,6 @@ class CRegTestParams : public CTestNetParams
500503 nToCheckBlockUpgradeMajority = 1000 ;
501504 nMinerThreads = 1 ;
502505 nLastPOWBlock = 250 ;
503- nStakeMinAge = 0 ;
504- nStakeMinDepth = 0 ;
505506 nMasternodeCountDrift = 4 ;
506507 nModifierUpdateBlock = 0 ;
507508 nZerocoinStartHeight = 300 ;
0 commit comments