From dae8e99875944a2b5c97057bc6fbb0e035368449 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Mon, 15 Jul 2024 08:14:51 -0500 Subject: [PATCH] GH-353 rename some variables --- libraries/chain/abi_serializer.cpp | 5 +-- libraries/chain/block_header_state.cpp | 34 ++++++++--------- libraries/chain/block_header_state_legacy.cpp | 5 +-- libraries/chain/block_state.cpp | 10 ++--- libraries/chain/controller.cpp | 32 ++++++++-------- .../eosio/chain/block_header_state.hpp | 2 +- unittests/block_header_tests.cpp | 32 ++++++++-------- unittests/finality_proof.hpp | 18 ++++----- ...pp => producer_schedule_savanna_tests.cpp} | 38 +++++++++---------- 9 files changed, 86 insertions(+), 90 deletions(-) rename unittests/{producer_schedule_if_tests.cpp => producer_schedule_savanna_tests.cpp} (94%) diff --git a/libraries/chain/abi_serializer.cpp b/libraries/chain/abi_serializer.cpp index c73356163b..a510445aa7 100644 --- a/libraries/chain/abi_serializer.cpp +++ b/libraries/chain/abi_serializer.cpp @@ -636,9 +636,8 @@ namespace eosio { namespace chain { void impl::abi_to_variant::add_block_header_finality_extension( mutable_variant_object& mvo, const header_extension_multimap& header_exts ) { if (header_exts.count(finality_extension::extension_id())) { - const auto& if_extension = - std::get(header_exts.lower_bound(finality_extension::extension_id())->second); - mvo("finality_extension", if_extension); + const auto& f_ext = std::get(header_exts.lower_bound(finality_extension::extension_id())->second); + mvo("finality_extension", f_ext); } } diff --git a/libraries/chain/block_header_state.cpp b/libraries/chain/block_header_state.cpp index 7e20d683b0..c6a6cdba0d 100644 --- a/libraries/chain/block_header_state.cpp +++ b/libraries/chain/block_header_state.cpp @@ -183,7 +183,7 @@ void evaluate_finalizer_policies_for_promotion(const block_header_state& prev, void finish_next(const block_header_state& prev, block_header_state& next_header_state, vector new_protocol_feature_activations, - finality_extension if_ext, + finality_extension f_ext, bool log) { // only log on assembled blocks, to avoid double logging // activated protocol features // --------------------------- @@ -210,8 +210,8 @@ void finish_next(const block_header_state& prev, } std::optional new_proposer_policy; - if (if_ext.new_proposer_policy_diff) { - new_proposer_policy = prev.get_last_proposed_proposer_policy().apply_diff(*if_ext.new_proposer_policy_diff); + if (f_ext.new_proposer_policy_diff) { + new_proposer_policy = prev.get_last_proposed_proposer_policy().apply_diff(*f_ext.new_proposer_policy_diff); } if (new_proposer_policy) { // called when assembling the block @@ -226,7 +226,7 @@ void finish_next(const block_header_state& prev, .timestamp = prev.timestamp(), .finalizer_policy_generation = prev.active_finalizer_policy->generation }; - next_header_state.core = prev.core.next(parent_block, if_ext.qc_claim); + next_header_state.core = prev.core.next(parent_block, f_ext.qc_claim); // finalizer policy // ---------------- @@ -236,8 +236,8 @@ void finish_next(const block_header_state& prev, next_header_state.last_pending_finalizer_policy_digest = fc::sha256::hash(next_header_state.get_last_pending_finalizer_policy()); - if (if_ext.new_finalizer_policy_diff) { - finalizer_policy new_finalizer_policy = prev.get_last_proposed_finalizer_policy().apply_diff(*if_ext.new_finalizer_policy_diff); + if (f_ext.new_finalizer_policy_diff) { + finalizer_policy new_finalizer_policy = prev.get_last_proposed_finalizer_policy().apply_diff(*f_ext.new_finalizer_policy_diff); // a new `finalizer_policy` was proposed in the previous block, and is present in the previous // block's header extensions. @@ -296,13 +296,13 @@ block_header_state block_header_state::next(block_header_state_input& input) con if (input.new_proposer_policy) { new_proposer_policy_diff = get_last_proposed_proposer_policy().create_diff(*input.new_proposer_policy); } - finality_extension new_if_ext { input.most_recent_ancestor_with_qc, - std::move(new_finalizer_policy_diff), - std::move(new_proposer_policy_diff) }; + finality_extension new_f_ext { input.most_recent_ancestor_with_qc, + std::move(new_finalizer_policy_diff), + std::move(new_proposer_policy_diff) }; - uint16_t if_ext_id = finality_extension::extension_id(); - emplace_extension(next_header_state.header.header_extensions, if_ext_id, fc::raw::pack(new_if_ext)); - next_header_state.header_exts.emplace(if_ext_id, new_if_ext); + uint16_t f_ext_id = finality_extension::extension_id(); + emplace_extension(next_header_state.header.header_extensions, f_ext_id, fc::raw::pack(new_f_ext)); + next_header_state.header_exts.emplace(f_ext_id, new_f_ext); // add protocol_feature_activation extension // ----------------------------------------- @@ -314,7 +314,7 @@ block_header_state block_header_state::next(block_header_state_input& input) con next_header_state.header_exts.emplace(ext_id, std::move(pfa_ext)); } - finish_next(*this, next_header_state, std::move(input.new_protocol_feature_activations), std::move(new_if_ext), true); + finish_next(*this, next_header_state, std::move(input.new_protocol_feature_activations), std::move(new_f_ext), true); return next_header_state; } @@ -355,13 +355,13 @@ block_header_state block_header_state::next(const signed_block_header& h, valida // -------------------------------------------------------------------- EOS_ASSERT(exts.count(finality_extension::extension_id()) > 0, invalid_block_header_extension, "Instant Finality Extension is expected to be present in all block headers after switch to IF"); - auto if_entry = exts.lower_bound(finality_extension::extension_id()); - const auto& if_ext = std::get(if_entry->second); + auto f_entry = exts.lower_bound(finality_extension::extension_id()); + const auto& f_ext = std::get(f_entry->second); if (h.is_proper_svnn_block()) { // if there is no Finality Tree Root associated with the block, // then this needs to validate that h.action_mroot is the empty digest - auto next_core_metadata = core.next_metadata(if_ext.qc_claim); + auto next_core_metadata = core.next_metadata(f_ext.qc_claim); bool no_finality_tree_associated = core.is_genesis_block_num(next_core_metadata.final_on_strong_qc_block_num); EOS_ASSERT(no_finality_tree_associated == h.action_mroot.empty(), block_validate_exception, @@ -371,7 +371,7 @@ block_header_state block_header_state::next(const signed_block_header& h, valida ("f", next_core_metadata.final_on_strong_qc_block_num)); }; - finish_next(*this, next_header_state, std::move(new_protocol_feature_activations), if_ext, false); + finish_next(*this, next_header_state, std::move(new_protocol_feature_activations), f_ext, false); return next_header_state; } diff --git a/libraries/chain/block_header_state_legacy.cpp b/libraries/chain/block_header_state_legacy.cpp index b4ba6001fb..15b453a7f3 100644 --- a/libraries/chain/block_header_state_legacy.cpp +++ b/libraries/chain/block_header_state_legacy.cpp @@ -157,10 +157,9 @@ namespace eosio::chain { } if (header_exts.count(finality_extension::extension_id())) { // transition to savanna has started - const auto& if_extension = - std::get(header_exts.lower_bound(finality_extension::extension_id())->second); + const auto& f_ext = std::get(header_exts.lower_bound(finality_extension::extension_id())->second); // copy over qc_claim from IF Genesis Block - result.qc_claim = if_extension.qc_claim; + result.qc_claim = f_ext.qc_claim; } return result; diff --git a/libraries/chain/block_state.cpp b/libraries/chain/block_state.cpp index a7be0c7ad3..ee0d88beef 100644 --- a/libraries/chain/block_state.cpp +++ b/libraries/chain/block_state.cpp @@ -70,9 +70,9 @@ block_state_ptr block_state::create_if_genesis_block(const block_state_legacy& b result.activated_protocol_features = bsp.activated_protocol_features; assert(bsp.block->contains_header_extension(finality_extension::extension_id())); // required by transition mechanism - finality_extension if_ext = bsp.block->extract_header_extension(); - assert(if_ext.new_finalizer_policy_diff); // required by transition mechanism - result.active_finalizer_policy = std::make_shared(finalizer_policy{}.apply_diff(std::move(*if_ext.new_finalizer_policy_diff))); + finality_extension f_ext = bsp.block->extract_header_extension(); + assert(f_ext.new_finalizer_policy_diff); // required by transition mechanism + result.active_finalizer_policy = std::make_shared(finalizer_policy{}.apply_diff(std::move(*f_ext.new_finalizer_policy_diff))); block_ref genesis_block_ref { .block_id = bsp.id(), @@ -302,8 +302,8 @@ qc_claim_t block_state::extract_qc_claim() const { auto itr = header_exts.lower_bound(finality_extension::extension_id()); if (itr == header_exts.end()) return {}; - const auto& if_ext = std::get(itr->second); - return if_ext.qc_claim; + const auto& f_ext = std::get(itr->second); + return f_ext.qc_claim; } valid_t block_state::new_valid(const block_header_state& next_bhs, const digest_type& action_mroot, const digest_type& strong_digest) const { diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index 0fd693891d..115cec3a2d 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -3427,15 +3427,13 @@ struct controller_impl { if (b.header_extensions != ab.header_extensions) { flat_multimap bheader_exts = b.validate_and_extract_header_extensions(); if (bheader_exts.count(finality_extension::extension_id())) { - const auto& if_extension = - std::get(bheader_exts.lower_bound(finality_extension::extension_id())->second); - elog("b if: ${i}", ("i", if_extension)); + const auto& f_ext = std::get(bheader_exts.lower_bound(finality_extension::extension_id())->second); + elog("b if: ${i}", ("i", f_ext)); } flat_multimap abheader_exts = ab.validate_and_extract_header_extensions(); if (abheader_exts.count(finality_extension::extension_id())) { - const auto& if_extension = - std::get(abheader_exts.lower_bound(finality_extension::extension_id())->second); - elog("ab if: ${i}", ("i", if_extension)); + const auto& f_ext = std::get(abheader_exts.lower_bound(finality_extension::extension_id())->second); + elog("ab if: ${i}", ("i", f_ext)); } } @@ -3445,16 +3443,16 @@ struct controller_impl { static std::optional extract_qc_data(const signed_block_ptr& b) { std::optional qc_data; auto hexts = b->validate_and_extract_header_extensions(); - if (auto if_entry = hexts.lower_bound(finality_extension::extension_id()); if_entry != hexts.end()) { - auto& if_ext = std::get(if_entry->second); + if (auto f_entry = hexts.lower_bound(finality_extension::extension_id()); f_entry != hexts.end()) { + auto& f_ext = std::get(f_entry->second); // get the matching qc extension if present auto exts = b->validate_and_extract_extensions(); if (auto entry = exts.lower_bound(quorum_certificate_extension::extension_id()); entry != exts.end()) { auto& qc_ext = std::get(entry->second); - return qc_data_t{ std::move(qc_ext.qc), if_ext.qc_claim }; + return qc_data_t{ std::move(qc_ext.qc), f_ext.qc_claim }; } - return qc_data_t{ {}, if_ext.qc_claim }; + return qc_data_t{ {}, f_ext.qc_claim }; } return {}; } @@ -3718,12 +3716,12 @@ struct controller_impl { // ----------------------------------------------------------------------------- void verify_qc_claim( const block_id_type& id, const signed_block_ptr& b, const block_header_state& prev ) { auto qc_ext_id = quorum_certificate_extension::extension_id(); - auto if_ext_id = finality_extension::extension_id(); + auto f_ext_id = finality_extension::extension_id(); // extract current block extension and previous header extension auto block_exts = b->validate_and_extract_extensions(); - std::optional prev_header_ext = prev.header.extract_header_extension(if_ext_id); - std::optional header_ext = b->extract_header_extension(if_ext_id); + std::optional prev_header_ext = prev.header.extract_header_extension(f_ext_id); + std::optional header_ext = b->extract_header_extension(f_ext_id); bool qc_extension_present = block_exts.count(qc_ext_id) != 0; uint32_t block_num = b->block_num(); @@ -3745,8 +3743,8 @@ struct controller_impl { } assert(header_ext); - const auto& if_ext = std::get(*header_ext); - const auto new_qc_claim = if_ext.qc_claim; + const auto& f_ext = std::get(*header_ext); + const auto new_qc_claim = f_ext.qc_claim; // If there is a header extension, but the previous block does not have a header extension, // ensure the block does not have a QC and the QC claim of the current block has a block_num @@ -3765,8 +3763,8 @@ struct controller_impl { // ---------------------------------------------------------------------------------------- assert(header_ext && prev_header_ext); - const auto& prev_if_ext = std::get(*prev_header_ext); - const auto prev_qc_claim = prev_if_ext.qc_claim; + const auto& prev_f_ext = std::get(*prev_header_ext); + const auto prev_qc_claim = prev_f_ext.qc_claim; // validate QC claim against previous block QC info diff --git a/libraries/chain/include/eosio/chain/block_header_state.hpp b/libraries/chain/include/eosio/chain/block_header_state.hpp index 68bcd04970..e5179a4832 100644 --- a/libraries/chain/include/eosio/chain/block_header_state.hpp +++ b/libraries/chain/include/eosio/chain/block_header_state.hpp @@ -91,7 +91,7 @@ struct block_header_state { std::optional> pending_finalizer_policy; // generation increases by one each time a new finalizer_policy is proposed in a block - // It matches the finalizer policy generation most recently included in this block's `if_extension` or its ancestors + // It matches the finalizer policy generation most recently included in this block's `finality_extension` or its ancestors uint32_t finalizer_policy_generation{1}; // digest of the finalizer policy (which includes the generation number in it) with the greatest generation number diff --git a/unittests/block_header_tests.cpp b/unittests/block_header_tests.cpp index 112aa3c854..b27d72ec76 100644 --- a/unittests/block_header_tests.cpp +++ b/unittests/block_header_tests.cpp @@ -30,11 +30,11 @@ BOOST_AUTO_TEST_CASE(finality_extension_with_empty_values_test) std::optional ext = header.extract_header_extension(finality_extension::extension_id()); BOOST_REQUIRE( !!ext ); - const auto& if_extension = std::get(*ext); - BOOST_REQUIRE_EQUAL( if_extension.qc_claim.block_num, last_qc_block_num ); - BOOST_REQUIRE_EQUAL( if_extension.qc_claim.is_strong_qc, is_last_strong_qc ); - BOOST_REQUIRE( !if_extension.new_finalizer_policy_diff ); - BOOST_REQUIRE( !if_extension.new_proposer_policy_diff ); + const auto& f_ext = std::get(*ext); + BOOST_REQUIRE_EQUAL( f_ext.qc_claim.block_num, last_qc_block_num ); + BOOST_REQUIRE_EQUAL( f_ext.qc_claim.is_strong_qc, is_last_strong_qc ); + BOOST_REQUIRE( !f_ext.new_finalizer_policy_diff ); + BOOST_REQUIRE( !f_ext.new_proposer_policy_diff ); } // test for finality_extension uniqueness @@ -86,20 +86,20 @@ BOOST_AUTO_TEST_CASE(finality_extension_with_values_test) std::optional ext = header.extract_header_extension(finality_extension::extension_id()); BOOST_REQUIRE( !!ext ); - const auto& if_extension = std::get(*ext); + const auto& f_ext = std::get(*ext); - BOOST_REQUIRE_EQUAL( if_extension.qc_claim.block_num, last_qc_block_num ); - BOOST_REQUIRE_EQUAL( if_extension.qc_claim.is_strong_qc, is_strong_qc ); + BOOST_REQUIRE_EQUAL( f_ext.qc_claim.block_num, last_qc_block_num ); + BOOST_REQUIRE_EQUAL( f_ext.qc_claim.is_strong_qc, is_strong_qc ); - BOOST_REQUIRE( !!if_extension.new_finalizer_policy_diff ); - BOOST_REQUIRE_EQUAL(if_extension.new_finalizer_policy_diff->generation, 1u); - BOOST_REQUIRE_EQUAL(if_extension.new_finalizer_policy_diff->threshold, 100u); - BOOST_REQUIRE_EQUAL(if_extension.new_finalizer_policy_diff->finalizers_diff.insert_indexes[0].second.description, "test description"); - BOOST_REQUIRE_EQUAL(if_extension.new_finalizer_policy_diff->finalizers_diff.insert_indexes[0].second.weight, 50u); - BOOST_REQUIRE_EQUAL(if_extension.new_finalizer_policy_diff->finalizers_diff.insert_indexes[0].second.public_key.to_string(), "PUB_BLS_qVbh4IjYZpRGo8U_0spBUM-u-r_G0fMo4MzLZRsKWmm5uyeQTp74YFaMN9IDWPoVVT5rj_Tw1gvps6K9_OZ6sabkJJzug3uGfjA6qiaLbLh5Fnafwv-nVgzzzBlU2kwRrcHc8Q"); + BOOST_REQUIRE( !!f_ext.new_finalizer_policy_diff ); + BOOST_REQUIRE_EQUAL(f_ext.new_finalizer_policy_diff->generation, 1u); + BOOST_REQUIRE_EQUAL(f_ext.new_finalizer_policy_diff->threshold, 100u); + BOOST_REQUIRE_EQUAL(f_ext.new_finalizer_policy_diff->finalizers_diff.insert_indexes[0].second.description, "test description"); + BOOST_REQUIRE_EQUAL(f_ext.new_finalizer_policy_diff->finalizers_diff.insert_indexes[0].second.weight, 50u); + BOOST_REQUIRE_EQUAL(f_ext.new_finalizer_policy_diff->finalizers_diff.insert_indexes[0].second.public_key.to_string(), "PUB_BLS_qVbh4IjYZpRGo8U_0spBUM-u-r_G0fMo4MzLZRsKWmm5uyeQTp74YFaMN9IDWPoVVT5rj_Tw1gvps6K9_OZ6sabkJJzug3uGfjA6qiaLbLh5Fnafwv-nVgzzzBlU2kwRrcHc8Q"); - BOOST_REQUIRE( !!if_extension.new_proposer_policy_diff ); - fc::time_point t = (fc::time_point)(if_extension.new_proposer_policy_diff->active_time); + BOOST_REQUIRE( !!f_ext.new_proposer_policy_diff ); + fc::time_point t = (fc::time_point)(f_ext.new_proposer_policy_diff->active_time); BOOST_REQUIRE_EQUAL(t.time_since_epoch().to_seconds(), 946684900ll); } diff --git a/unittests/finality_proof.hpp b/unittests/finality_proof.hpp index 4e0ba7b70b..37166441e9 100644 --- a/unittests/finality_proof.hpp +++ b/unittests/finality_proof.hpp @@ -71,16 +71,16 @@ namespace finality_proof { static qc_data_t extract_qc_data(const signed_block_ptr& b) { assert(b); auto hexts = b->validate_and_extract_header_extensions(); - if (auto if_entry = hexts.lower_bound(finality_extension::extension_id()); if_entry != hexts.end()) { - auto& if_ext = std::get(if_entry->second); + if (auto f_entry = hexts.lower_bound(finality_extension::extension_id()); f_entry != hexts.end()) { + auto& f_ext = std::get(f_entry->second); // get the matching qc extension if present auto exts = b->validate_and_extract_extensions(); if (auto entry = exts.lower_bound(quorum_certificate_extension::extension_id()); entry != exts.end()) { auto& qc_ext = std::get(entry->second); - return qc_data_t{ std::move(qc_ext.qc), if_ext.qc_claim }; + return qc_data_t{ std::move(qc_ext.qc), f_ext.qc_claim }; } - return qc_data_t{ {}, if_ext.qc_claim }; + return qc_data_t{ {}, f_ext.qc_claim }; } return {}; } @@ -88,21 +88,21 @@ namespace finality_proof { static bool has_finalizer_policy_diffs(const signed_block_ptr& block){ // extract new finalizer policy - finality_extension if_ext = block->extract_header_extension(); + finality_extension f_ext = block->extract_header_extension(); - return if_ext.new_finalizer_policy_diff.has_value(); + return f_ext.new_finalizer_policy_diff.has_value(); } static finalizer_policy update_finalizer_policy(const signed_block_ptr block, const finalizer_policy& current_policy){ // extract new finalizer policy - finality_extension if_ext = block->extract_header_extension(); + finality_extension f_ext = block->extract_header_extension(); - assert(if_ext.new_finalizer_policy_diff.has_value()); + assert(f_ext.new_finalizer_policy_diff.has_value()); finalizer_policy active_finalizer_policy = - current_policy.apply_diff(if_ext.new_finalizer_policy_diff.value()); + current_policy.apply_diff(f_ext.new_finalizer_policy_diff.value()); return active_finalizer_policy; diff --git a/unittests/producer_schedule_if_tests.cpp b/unittests/producer_schedule_savanna_tests.cpp similarity index 94% rename from unittests/producer_schedule_if_tests.cpp rename to unittests/producer_schedule_savanna_tests.cpp index 93860444dc..7da9f42b70 100644 --- a/unittests/producer_schedule_if_tests.cpp +++ b/unittests/producer_schedule_savanna_tests.cpp @@ -8,7 +8,7 @@ using namespace eosio::testing; using namespace eosio::chain; using mvo = fc::mutable_variant_object; -BOOST_AUTO_TEST_SUITE(producer_schedule_if_tests) +BOOST_AUTO_TEST_SUITE(producer_schedule_savanna_tests) namespace { @@ -137,7 +137,7 @@ BOOST_FIXTURE_TEST_CASE( proposer_policy_progression_test, legacy_validating_tes fc::mutable_variant_object()("schedule", schedule_variant), DEFAULT_EXPIRATION_DELTA + (++unique)); }; - auto verify_block_if_ext_producer = [](const signed_block_ptr& block, uint32_t version, account_name new_producer) { + auto verify_block_finality_ext_producer = [](const signed_block_ptr& block, uint32_t version, account_name new_producer) { std::optional ext = block->extract_header_extension(finality_extension::extension_id()); BOOST_TEST(!!ext); std::optional policy_diff = std::get(*ext).new_proposer_policy_diff; @@ -168,7 +168,7 @@ BOOST_FIXTURE_TEST_CASE( proposer_policy_progression_test, legacy_validating_tes // set a new proposer policy sch1 set_producers( {"alice"_n} ); auto b = produce_block(); - verify_block_if_ext_producer(b, 1, "alice"_n); + verify_block_finality_ext_producer(b, 1, "alice"_n); vector alice_sch = { producer_authority{"alice"_n, block_signing_authority_v0{1, {{get_public_key("alice"_n, "active"), 1}}}} }; @@ -187,7 +187,7 @@ BOOST_FIXTURE_TEST_CASE( proposer_policy_progression_test, legacy_validating_tes producer_authority{"carol"_n, block_signing_authority_v0{ 1, {{get_public_key("carol"_n, "active"),1}}}} }; b = produce_block(); - verify_block_if_ext_producer(b, 2u, "bob"_n); + verify_block_finality_ext_producer(b, 2u, "bob"_n); // set another ploicy should replace sch2 set_producers( {"bob"_n,"alice"_n} ); @@ -196,7 +196,7 @@ BOOST_FIXTURE_TEST_CASE( proposer_policy_progression_test, legacy_validating_tes producer_authority{"alice"_n, block_signing_authority_v0{ 1, {{get_public_key("alice"_n, "active"),1}}}} }; b = produce_block(); - verify_block_if_ext_producer(b, 3u, "alice"_n); + verify_block_finality_ext_producer(b, 3u, "alice"_n); // another round produce_blocks(config::producer_repetitions-2, true); // -2, already produced tow of the round above @@ -248,11 +248,11 @@ BOOST_FIXTURE_TEST_CASE( proposer_policy_progression_test, legacy_validating_tes // test change in same block where there is an existing proposed that is the same set_producers( {"bob"_n,"alice"_n} ); b = produce_block(); - verify_block_if_ext_producer(b, 5u, "alice"_n); + verify_block_finality_ext_producer(b, 5u, "alice"_n); set_producers( {"bob"_n,"carol"_n} ); set_producers_force({"bob"_n,"carol"_n} ); b = produce_block(); - verify_block_if_ext_producer(b, 6u, "carol"_n); + verify_block_finality_ext_producer(b, 6u, "carol"_n); produce_blocks(config::producer_repetitions-2, true); produce_blocks(config::producer_repetitions, true); BOOST_CHECK_EQUAL( 6u, control->active_producers().version ); // should be 6 now as bob,carol now active @@ -283,10 +283,10 @@ BOOST_FIXTURE_TEST_CASE( proposer_policy_progression_test, legacy_validating_tes produce_block(); set_producers({"bob"_n,"carol"_n}); // B2 b = produce_block(); - verify_block_if_ext_producer(b, 8u, "bob"_n); + verify_block_finality_ext_producer(b, 8u, "bob"_n); set_producers({"bob"_n, "alice"_n} ); // P3 b = produce_block(); - verify_block_if_ext_producer(b, 9u, "alice"_n); + verify_block_finality_ext_producer(b, 9u, "alice"_n); produce_blocks(config::producer_repetitions-3, true); // B12 produce_block(); // C1 BOOST_CHECK_EQUAL( 7u, control->active_producers().version ); @@ -307,15 +307,15 @@ BOOST_FIXTURE_TEST_CASE( proposer_policy_progression_test, legacy_validating_tes produce_block(); set_producers({"bob"_n,"carol"_n}); // A2, P1 b = produce_block(); - verify_block_if_ext_producer(b, 10u, "carol"_n); + verify_block_finality_ext_producer(b, 10u, "carol"_n); produce_blocks(config::producer_repetitions-2, true); // A12 produce_block(); set_producers({"alice"_n}); // B2 b = produce_block(); - verify_block_if_ext_producer(b, 11u, "alice"_n); + verify_block_finality_ext_producer(b, 11u, "alice"_n); set_producers({"bob"_n,"carol"_n}); // P3 == P1 b = produce_block(); - verify_block_if_ext_producer(b, 12u, "bob"_n); + verify_block_finality_ext_producer(b, 12u, "bob"_n); produce_blocks(config::producer_repetitions-3, true); // B12 produce_block(); // C1 BOOST_CHECK_EQUAL( 10u, control->active_producers().version ); @@ -334,32 +334,32 @@ BOOST_FIXTURE_TEST_CASE( proposer_policy_progression_test, legacy_validating_tes produce_block(); // 2 set_producers({"alice"_n}); b = produce_block(); // 3 - verify_block_if_ext_producer(b, 13u, "alice"_n); + verify_block_finality_ext_producer(b, 13u, "alice"_n); set_producers({"carol"_n,"alice"_n}); b = produce_block(); // 4 - verify_block_if_ext_producer(b, 14u, "carol"_n); + verify_block_finality_ext_producer(b, 14u, "carol"_n); set_producers({"carol"_n}); produce_block(); // 5 set_producers({"alice"_n}); b = produce_block(); // 6 - verify_block_if_ext_producer(b, 16u, "alice"_n); + verify_block_finality_ext_producer(b, 16u, "alice"_n); set_producers({"bob"_n,"carol"_n}); b = produce_block(); - verify_block_if_ext_producer(b, 17u, "bob"_n); + verify_block_finality_ext_producer(b, 17u, "bob"_n); produce_blocks(config::producer_repetitions-7, true); set_producers({"bob"_n}); produce_block(); // 2 set_producers({"bob"_n,"carol"_n}); b = produce_block(); // 3 - verify_block_if_ext_producer(b, 19u, "carol"_n); + verify_block_finality_ext_producer(b, 19u, "carol"_n); set_producers({"carol"_n,"bob"_n}); produce_block(); // 4 set_producers({"alice"_n} ); b = produce_block(); // 5 - verify_block_if_ext_producer(b, 21u, "alice"_n); + verify_block_finality_ext_producer(b, 21u, "alice"_n); set_producers({"bob"_n,"carol"_n}); b = produce_block(); - verify_block_if_ext_producer(b, 22u, "bob"_n); + verify_block_finality_ext_producer(b, 22u, "bob"_n); produce_blocks(config::producer_repetitions-6, true); // B12 BOOST_CHECK_EQUAL( 17u, control->active_producers().version ); BOOST_CHECK_EQUAL( true, compare_schedules( bob_carol_sch, control->active_producers() ) );