mirror of
https://github.com/jwinterm/myriadcoin.git
synced 2026-12-01 12:23:55 +01:00
change testnet heights for auxpow and block time
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
+4
-5
@@ -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
|
||||
|
||||
+2
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user