Test RandomX bootstrap difficulty
This commit is contained in:
parent
c34b90267a
commit
b46ce28c09
1 changed files with 8 additions and 4 deletions
|
|
@ -828,16 +828,20 @@ BOOST_AUTO_TEST_CASE(MultiAlgo_DAA_activation_boundary_test)
|
||||||
firstMultiAlgoShaBits,
|
firstMultiAlgoShaBits,
|
||||||
expectedShaTarget.GetCompact());
|
expectedShaTarget.GetCompact());
|
||||||
|
|
||||||
// No RandomX block exists yet. For now this deliberately documents
|
// No RandomX block exists yet, so the first RandomX block must use
|
||||||
// the current fallback to InitialDifficulty(). This is NOT the final
|
// the explicitly configured RandomX bootstrap target.
|
||||||
// RandomX launch calibration and will be replaced by an explicit
|
|
||||||
// RandomX initial target before activation is enabled.
|
|
||||||
const unsigned int firstRandomXBits =
|
const unsigned int firstRandomXBits =
|
||||||
GetNextWorkRequired(&blocks[39], nullptr, consensus, ALGO_RANDOMX);
|
GetNextWorkRequired(&blocks[39], nullptr, consensus, ALGO_RANDOMX);
|
||||||
|
|
||||||
BOOST_CHECK_EQUAL(
|
BOOST_CHECK_EQUAL(
|
||||||
firstRandomXBits,
|
firstRandomXBits,
|
||||||
RandomXInitialDifficulty(consensus));
|
RandomXInitialDifficulty(consensus));
|
||||||
|
|
||||||
|
// Mainnet bootstrap calibration: approximately one RandomX block every
|
||||||
|
// 20 minutes at the reference 66.76 kH/s hashrate.
|
||||||
|
BOOST_CHECK_EQUAL(
|
||||||
|
RandomXInitialDifficulty(consensus),
|
||||||
|
0x1d359bc1U);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue