Blackcoin Lore
This commit is contained in:
@@ -26,7 +26,7 @@ BOOST_AUTO_TEST_CASE(get_next_work)
|
||||
pindexLast.nHeight = 32255;
|
||||
pindexLast.nTime = 1262152739; // Block #32255
|
||||
pindexLast.nBits = 0x1d00ffff;
|
||||
BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1d00d86a);
|
||||
BOOST_CHECK_EQUAL(CalculateNextTargetRequired(&pindexLast, nLastRetargetTime, params), 0x1d00d86a);
|
||||
}
|
||||
|
||||
/* Test the constraint on the upper bound for next work */
|
||||
@@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_pow_limit)
|
||||
pindexLast.nHeight = 2015;
|
||||
pindexLast.nTime = 1233061996; // Block #2015
|
||||
pindexLast.nBits = 0x1d00ffff;
|
||||
BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1d00ffff);
|
||||
BOOST_CHECK_EQUAL(CalculateNextTargetRequired(&pindexLast, nLastRetargetTime, params), 0x1d00ffff);
|
||||
}
|
||||
|
||||
/* Test the constraint on the lower bound for actual time taken */
|
||||
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_lower_limit_actual)
|
||||
pindexLast.nHeight = 68543;
|
||||
pindexLast.nTime = 1279297671; // Block #68543
|
||||
pindexLast.nBits = 0x1c05a3f4;
|
||||
BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1c0168fd);
|
||||
BOOST_CHECK_EQUAL(CalculateNextTargetRequired(&pindexLast, nLastRetargetTime, params), 0x1c0168fd);
|
||||
}
|
||||
|
||||
/* Test the constraint on the upper bound for actual time taken */
|
||||
@@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE(get_next_work_upper_limit_actual)
|
||||
pindexLast.nHeight = 46367;
|
||||
pindexLast.nTime = 1269211443; // Block #46367
|
||||
pindexLast.nBits = 0x1c387f6f;
|
||||
BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1d00e1fd);
|
||||
BOOST_CHECK_EQUAL(CalculateNextTargetRequired(&pindexLast, nLastRetargetTime, params), 0x1d00e1fd);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GetBlockProofEquivalentTime_test)
|
||||
@@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE(GetBlockProofEquivalentTime_test)
|
||||
for (int i = 0; i < 10000; i++) {
|
||||
blocks[i].pprev = i ? &blocks[i - 1] : NULL;
|
||||
blocks[i].nHeight = i;
|
||||
blocks[i].nTime = 1269211443 + i * params.nPowTargetSpacing;
|
||||
blocks[i].nTime = 1269211443 + i * params.nTargetSpacing;
|
||||
blocks[i].nBits = 0x207fffff; /* target 0x7fffff000... */
|
||||
blocks[i].nChainWork = i ? blocks[i - 1].nChainWork + GetBlockProof(blocks[i - 1]) : arith_uint256(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user