Skip to content

Commit

Permalink
GH-1916 Provide default no-op functions for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Nov 21, 2023
1 parent a0a2d76 commit bd037a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libraries/hotstuff/include/eosio/hotstuff/chain_pacemaker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ namespace eosio::hotstuff {
boost::signals2::scoped_connection _irreversible_block_connection;

qc_chain _qc_chain;
std::function<void(const std::optional<uint32_t>&, const hs_message&)> bcast_hs_message;
std::function<void(uint32_t, const hs_message_warning&)> warn_hs_message;
std::function<void(const std::optional<uint32_t>&, const hs_message&)> bcast_hs_message = [](const std::optional<uint32_t>&, const hs_message&){};
std::function<void(uint32_t, const hs_message_warning&)> warn_hs_message = [](uint32_t, const hs_message_warning&){};

uint32_t _quorum_threshold = 15; //FIXME/TODO: calculate from schedule
fc::logger& _logger;
Expand Down
2 changes: 0 additions & 2 deletions libraries/testing/tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,6 @@ namespace eosio { namespace testing {
}
});
control->create_pacemaker({}, {}, test_logger);
control->register_pacemaker_bcast_function([](const std::optional<uint32_t>&, 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 ) {
Expand Down

0 comments on commit bd037a7

Please sign in to comment.