diff --git a/src/core.h b/src/core.h index 101b46a5..4541bfc9 100644 --- a/src/core.h +++ b/src/core.h @@ -44,7 +44,7 @@ static const int BLOCK_VERSION_CHAIN_END = (1 << 30); static const int AUXPOW_CHAIN_ID = 0x005A; static const int AUXPOW_START_MAINNET = 1400000; -static const int AUXPOW_START_TESTNET = 1; +static const int AUXPOW_START_TESTNET = 175; static const int Phase2Timespan_Start = 1400010; static const int GeoAvgWork_Start = 1400020; diff --git a/src/main.cpp b/src/main.cpp index 45853523..04ddb315 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1460,7 +1460,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead } int64_t lnMinActualTimespan; - if (TestNet() || (pindexLast->nHeight >= Phase2Timespan_Start)) + if ((TestNet() && pindexLast->nHeight>=150) || (pindexLast->nHeight >= Phase2Timespan_Start)) lnMinActualTimespan = nMinActualTimespanP2; else if (pindexLast->nHeight >= nBlockDiffAdjustV2) @@ -1469,7 +1469,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead lnMinActualTimespan = nMinActualTimespanV1; int64_t lnMaxActualTimespan; - if (TestNet() || (pindexLast->nHeight >= Phase2Timespan_Start)) + if ((TestNet() && pindexLast->nHeight>=150) || (pindexLast->nHeight >= Phase2Timespan_Start)) lnMaxActualTimespan = nMaxActualTimespanP2; else lnMaxActualTimespan = nMaxActualTimespanP1; @@ -1481,7 +1481,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead LogPrintf(" nActualTimespan = %d after bounds %d %d\n", nActualTimespan, lnMinActualTimespan, lnMaxActualTimespan); int64_t lnAveragingTargetTimespan; - if (TestNet() || (pindexLast->nHeight >= Phase2Timespan_Start)) + if ((TestNet() && pindexLast->nHeight>=150) || (pindexLast->nHeight >= Phase2Timespan_Start)) lnAveragingTargetTimespan = nAveragingTargetTimespanP2; else lnAveragingTargetTimespan = nAveragingTargetTimespanP1; @@ -1523,8 +1523,7 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits, int algo) bool CBlockHeader::CheckProofOfWork(int nHeight) const { int algo = GetAlgo(); - if ( (nHeight >= GetAuxPowStartBlock()) && - ((algo == ALGO_SHA256D) || (algo == ALGO_SCRYPT)) + if ( (nHeight >= GetAuxPowStartBlock()) && ((algo == ALGO_SHA256D) || (algo == ALGO_SCRYPT)) ) { // Prevent same work from being submitted twice: // - this block must have our chain ID diff --git a/src/main.h b/src/main.h index 095c3d0c..f7e0c419 100644 --- a/src/main.h +++ b/src/main.h @@ -988,8 +988,7 @@ public: CBigNum GetBlockWorkAdjusted() const { CBigNum bnRes; - if ((TestNet() && (nHeight > 50)) || - (nHeight >= GeoAvgWork_Start)) + if ( (TestNet() && (nHeight > 150)) || (nHeight >= GeoAvgWork_Start) ) { CBigNum nBlockWork = GetBlockWork(); int nAlgo = GetAlgo(); @@ -1040,7 +1039,7 @@ public: bool CheckIndex() const { - /* This check was considered unneccessary given the other safeguards like the genesis and checkpoints, and it breaks LoadBlockIndexGuts() after AuxPow is enabled. */ + /* This check was considered unneccessary given the other safeguards like the genesis and checkpoints, and it breaks LoadBlockIndexGuts() after AuxPow is enabled. */ /* int algo = GetAlgo(); if (algo == ALGO_SHA256D)