diff --git a/libraries/hotstuff/include/eosio/hotstuff/qc_chain.hpp b/libraries/hotstuff/include/eosio/hotstuff/qc_chain.hpp index 4e658fc1e0..7fc8232d95 100644 --- a/libraries/hotstuff/include/eosio/hotstuff/qc_chain.hpp +++ b/libraries/hotstuff/include/eosio/hotstuff/qc_chain.hpp @@ -147,7 +147,7 @@ namespace eosio::hotstuff { void process_new_view(const hs_new_view_message& msg); //handles new view void process_new_block(const hs_new_block_message& msg); //handles new block - hs_vote_message sign_proposal(const hs_proposal_message& proposal, const fc::crypto::blslib::bls_private_key& finalizer_priv_key, const fc::crypto::blslib::bls_public_key& finalizer_pub_key); + hs_vote_message sign_proposal(const hs_proposal_message& proposal, const fc::crypto::blslib::bls_private_key& finalizer_priv_key); bool extends(const fc::sha256& descendant, const fc::sha256& ancestor); //verify that a proposal descends from another @@ -186,7 +186,6 @@ namespace eosio::hotstuff { quorum_certificate _high_qc; quorum_certificate _current_qc; uint32_t _v_height = 0; - //eosio::chain::extended_schedule _schedule; base_pacemaker* _pacemaker = nullptr; std::set _my_producers; chain::bls_key_map_t _my_finalizer_keys; diff --git a/libraries/hotstuff/qc_chain.cpp b/libraries/hotstuff/qc_chain.cpp index 12f68675c9..72c5f77652 100644 --- a/libraries/hotstuff/qc_chain.cpp +++ b/libraries/hotstuff/qc_chain.cpp @@ -271,7 +271,7 @@ namespace eosio::hotstuff { return false; } - hs_vote_message qc_chain::sign_proposal(const hs_proposal_message& proposal, const fc::crypto::blslib::bls_private_key& finalizer_priv_key, const fc::crypto::blslib::bls_public_key& finalizer_pub_key){ + hs_vote_message qc_chain::sign_proposal(const hs_proposal_message& proposal, const fc::crypto::blslib::bls_private_key& finalizer_priv_key){ _v_height = proposal.get_height(); digest_type digest = get_digest_to_sign(proposal.block_id, proposal.phase_counter, proposal.final_on_qc); @@ -280,7 +280,7 @@ namespace eosio::hotstuff { fc::crypto::blslib::bls_signature sig = finalizer_priv_key.sign(h); - hs_vote_message v_msg = {proposal.proposal_id, finalizer_pub_key, sig}; + hs_vote_message v_msg = {proposal.proposal_id, finalizer_priv_key.get_public_key(), sig}; return v_msg; } @@ -379,7 +379,7 @@ namespace eosio::hotstuff { if (fin_itr!=finalizers.end()) { - hs_vote_message v_msg = sign_proposal(proposal, mfk_itr->second, mfk_itr->first); + hs_vote_message v_msg = sign_proposal(proposal, mfk_itr->second); fc_tlog(_logger, " === ${id} signed proposal : block_num ${block_num} phase ${phase_counter} : proposal_id ${proposal_id}", ("id", _id)