| 13 | |
| 14 | /* Test calculation of next difficulty target with no constraints applying */ |
| 15 | BOOST_AUTO_TEST_CASE(get_next_work) |
| 16 | { |
| 17 | const auto chainParams = CreateChainParams(*m_node.args, CBaseChainParams::MAIN); |
| 18 | int64_t nLastRetargetTime = 1261130161; // Block #30240 |
| 19 | CBlockIndex pindexLast; |
| 20 | pindexLast.nHeight = 32255; |
| 21 | pindexLast.nTime = 1262152739; // Block #32255 |
| 22 | pindexLast.nBits = 0x1d00ffff; |
| 23 | BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, chainParams->GetConsensus()), 0x1d00d86aU); |
| 24 | } |
| 25 | |
| 26 | /* Test the constraint on the upper bound for next work */ |
| 27 | BOOST_AUTO_TEST_CASE(get_next_work_pow_limit) |
nothing calls this directly
no test coverage detected