Skip to content

Commit faec1e9

Browse files
author
MarcoFalke
committed
test: Address outstanding versionbits_test feedback
* bitcoin/bitcoin#21377 (comment) * bitcoin/bitcoin#21377 (comment)
1 parent fad4167 commit faec1e9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/test/versionbits_tests.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,9 @@ class VersionBitsTester
8181
TestNeverActiveConditionChecker checker_never[CHECKERS];
8282

8383
// Test counter (to identify failures)
84-
int num;
84+
int num{1000};
8585

8686
public:
87-
VersionBitsTester() : num(1000) {}
88-
8987
VersionBitsTester& Reset() {
9088
// Have each group of tests be counted by the 1000s part, starting at 1000
9189
num = num - (num % 1000) + 1000;
@@ -300,7 +298,7 @@ static void check_computeblockversion(const Consensus::Params& params, Consensus
300298
BOOST_REQUIRE(0 <= bit && bit < 32);
301299
BOOST_REQUIRE(((1 << bit) & VERSIONBITS_TOP_MASK) == 0);
302300
BOOST_REQUIRE(min_activation_height >= 0);
303-
BOOST_REQUIRE_EQUAL(min_activation_height % params.nMinerConfirmationWindow, 0);
301+
BOOST_REQUIRE_EQUAL(min_activation_height % params.nMinerConfirmationWindow, 0U);
304302

305303
// In the first chain, test that the bit is set by CBV until it has failed.
306304
// In the second chain, test the bit is set by CBV while STARTED and

0 commit comments

Comments
 (0)