From 4cab84cfdfc98cd10462681b5eb0fbbc08afd2a7 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 6 Mar 2021 18:18:49 +1000 Subject: versionbits: Add support for delayed activation Github-Pull: #21377 Rebased-From: 73d4a706393e6dbd6b6d6b6428f8d3233ac0a2d8 --- src/test/versionbits_tests.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/test') diff --git a/src/test/versionbits_tests.cpp b/src/test/versionbits_tests.cpp index b42aaff9ad..ae0d47b2b4 100644 --- a/src/test/versionbits_tests.cpp +++ b/src/test/versionbits_tests.cpp @@ -255,6 +255,7 @@ static void check_computeblockversion(const Consensus::Params& params, Consensus int64_t bit = params.vDeployments[dep].bit; int64_t nStartTime = params.vDeployments[dep].nStartTime; int64_t nTimeout = params.vDeployments[dep].nTimeout; + int min_activation_height = params.vDeployments[dep].min_activation_height; // should not be any signalling for first block BOOST_CHECK_EQUAL(ComputeBlockVersion(nullptr, params), VERSIONBITS_TOP_BITS); @@ -267,6 +268,7 @@ static void check_computeblockversion(const Consensus::Params& params, Consensus BOOST_REQUIRE(nTimeout <= std::numeric_limits::max() || nTimeout == Consensus::BIP9Deployment::NO_TIMEOUT); BOOST_REQUIRE(0 <= bit && bit < 32); BOOST_REQUIRE(((1 << bit) & VERSIONBITS_TOP_MASK) == 0); + BOOST_REQUIRE(min_activation_height == 0); // 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