From bd037a74036f3b07ace61b881bc34fd7e40bfe35 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 21 Nov 2023 13:18:54 -0600 Subject: [PATCH] GH-1916 Provide default no-op functions for testing --- libraries/hotstuff/include/eosio/hotstuff/chain_pacemaker.hpp | 4 ++-- libraries/testing/tester.cpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libraries/hotstuff/include/eosio/hotstuff/chain_pacemaker.hpp b/libraries/hotstuff/include/eosio/hotstuff/chain_pacemaker.hpp index 5d9561fd33..c6b73ef99b 100644 --- a/libraries/hotstuff/include/eosio/hotstuff/chain_pacemaker.hpp +++ b/libraries/hotstuff/include/eosio/hotstuff/chain_pacemaker.hpp @@ -80,8 +80,8 @@ namespace eosio::hotstuff { boost::signals2::scoped_connection _irreversible_block_connection; qc_chain _qc_chain; - std::function&, const hs_message&)> bcast_hs_message; - std::function warn_hs_message; + std::function&, const hs_message&)> bcast_hs_message = [](const std::optional&, const hs_message&){}; + std::function warn_hs_message = [](uint32_t, const hs_message_warning&){}; uint32_t _quorum_threshold = 15; //FIXME/TODO: calculate from schedule fc::logger& _logger; diff --git a/libraries/testing/tester.cpp b/libraries/testing/tester.cpp index 9341876d70..8c6066d3a8 100644 --- a/libraries/testing/tester.cpp +++ b/libraries/testing/tester.cpp @@ -350,8 +350,6 @@ namespace eosio { namespace testing { } }); control->create_pacemaker({}, {}, test_logger); - control->register_pacemaker_bcast_function([](const std::optional&, const hotstuff::hs_message&){}); - control->register_pacemaker_warn_function([](uint32_t, const hotstuff::hs_message_warning&){}); } void base_tester::open( protocol_feature_set&& pfs, const snapshot_reader_ptr& snapshot ) {