diff --git a/src/test/pow_tests.cpp b/src/test/pow_tests.cpp --- a/src/test/pow_tests.cpp +++ b/src/test/pow_tests.cpp @@ -341,11 +341,14 @@ const uint32_t nextBits = GetNextCashWorkRequired(&blocks[i], &blkHeaderDummy, config); + arith_uint256 currentTarget; currentTarget.SetCompact(nBits); arith_uint256 nextTarget; nextTarget.SetCompact(nextBits); + + // Check the difficulty decreases. BOOST_CHECK(nextTarget <= powLimit); BOOST_CHECK(nextTarget > currentTarget);