Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
systemzax committed Sep 10, 2023
1 parent c8d9d38 commit 81486ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions libraries/hotstuff/include/eosio/hotstuff/qc_chain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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<name> _my_producers;
chain::bls_key_map_t _my_finalizer_keys;
Expand Down
6 changes: 3 additions & 3 deletions libraries/hotstuff/qc_chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 81486ed

Please sign in to comment.