From faec1e9ee1f12612831ad5b0f0a767d87bd2d024 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sat, 17 Apr 2021 10:27:16 +0200 Subject: test: Address outstanding versionbits_test feedback * https://github.com/bitcoin/bitcoin/pull/21377#discussion_r609585080 * https://github.com/bitcoin/bitcoin/pull/21377#discussion_r613702341 --- src/test/versionbits_tests.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/test/versionbits_tests.cpp') diff --git a/src/test/versionbits_tests.cpp b/src/test/versionbits_tests.cpp index c80f8cbf87..ad27c1c26e 100644 --- a/src/test/versionbits_tests.cpp +++ b/src/test/versionbits_tests.cpp @@ -81,11 +81,9 @@ class VersionBitsTester TestNeverActiveConditionChecker checker_never[CHECKERS]; // Test counter (to identify failures) - int num; + int num{1000}; public: - VersionBitsTester() : num(1000) {} - VersionBitsTester& Reset() { // Have each group of tests be counted by the 1000s part, starting at 1000 num = num - (num % 1000) + 1000; @@ -300,7 +298,7 @@ static void check_computeblockversion(const Consensus::Params& params, Consensus BOOST_REQUIRE(0 <= bit && bit < 32); BOOST_REQUIRE(((1 << bit) & VERSIONBITS_TOP_MASK) == 0); BOOST_REQUIRE(min_activation_height >= 0); - BOOST_REQUIRE_EQUAL(min_activation_height % params.nMinerConfirmationWindow, 0); + BOOST_REQUIRE_EQUAL(min_activation_height % params.nMinerConfirmationWindow, 0U); // In the first chain, test that the bit is set by CBV until it has failed. // In the second chain, test the bit is set by CBV while STARTED and -- cgit v1.2.3