aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/hotstuff/consensus.h10
-rw-r--r--include/hotstuff/liveness.h12
2 files changed, 11 insertions, 11 deletions
diff --git a/include/hotstuff/consensus.h b/include/hotstuff/consensus.h
index 2752912..61d9167 100644
--- a/include/hotstuff/consensus.h
+++ b/include/hotstuff/consensus.h
@@ -38,9 +38,9 @@ class HotStuffCore {
block_t b0; /** the genesis block */
/* === state variables === */
/** block containing the QC for the highest block having one */
- std::pair<block_t, quorum_cert_bt> hqc;
- block_t block; /**< locked block */
- block_t bexec; /**< last executed block */
+ std::pair<block_t, quorum_cert_bt> hqc; /**< highest QC */
+ block_t b_lock; /**< locked block */
+ block_t b_exec; /**< last executed block */
uint32_t vheight; /**< height of the block last voted for */
/* === auxilliary variables === */
privkey_bt priv_key; /**< private key for signing votes */
@@ -53,7 +53,7 @@ class HotStuffCore {
promise_t hqc_update_waiting;
/* == feature switches == */
/** always vote negatively, useful for some PaceMakers */
- bool neg_vote;
+ bool vote_disabled;
block_t get_delivered_blk(const uint256_t &blk_hash);
void sanity_check_delivered(const block_t &blk);
@@ -163,7 +163,7 @@ class HotStuffCore {
ReplicaID get_id() const { return id; }
const std::set<block_t, BlockHeightCmp> get_tails() const { return tails; }
operator std::string () const;
- void set_neg_vote(bool _neg_vote) { neg_vote = _neg_vote; }
+ void set_vote_disabled(bool f) { vote_disabled = f; }
};
/** Abstraction for proposal messages. */
diff --git a/include/hotstuff/liveness.h b/include/hotstuff/liveness.h
index f4027a2..03b375e 100644
--- a/include/hotstuff/liveness.h
+++ b/include/hotstuff/liveness.h
@@ -404,7 +404,7 @@ class PMStickyProposer: virtual public PaceMaker {
role = FOLLOWER;
proposer = new_proposer;
last_proposed = nullptr;
- hsc->set_neg_vote(false);
+ hsc->set_vote_disabled(false);
timer.clear();
/* redirect all pending cmds to the new proposer */
while (!pending_beats.empty())
@@ -421,7 +421,7 @@ class PMStickyProposer: virtual public PaceMaker {
role = PROPOSER;
proposer = hsc->get_id();
last_proposed = nullptr;
- hsc->set_neg_vote(true);
+ hsc->set_vote_disabled(true);
timer = TimerEvent(ec, [this](TimerEvent &) {
/* proposer unable to get a QC in time */
to_candidate();
@@ -436,7 +436,7 @@ class PMStickyProposer: virtual public PaceMaker {
role = CANDIDATE;
proposer = hsc->get_id();
last_proposed = nullptr;
- hsc->set_neg_vote(false);
+ hsc->set_vote_disabled(false);
timer = TimerEvent(ec, [this](TimerEvent &) {
candidate_qc_timeout();
});
@@ -660,7 +660,7 @@ class PMRoundRobinProposer: virtual public PaceMaker {
clear_promises();
role = FOLLOWER;
last_proposed = nullptr;
- hsc->set_neg_vote(false);
+ hsc->set_vote_disabled(false);
timer.clear();
/* redirect all pending cmds to the new proposer */
while (!pending_beats.empty())
@@ -676,7 +676,7 @@ class PMRoundRobinProposer: virtual public PaceMaker {
clear_promises();
role = PROPOSER;
last_proposed = nullptr;
- hsc->set_neg_vote(true);
+ hsc->set_vote_disabled(true);
timer = TimerEvent(ec, [this](TimerEvent &) {
/* proposer unable to get a QC in time */
to_candidate();
@@ -689,7 +689,7 @@ class PMRoundRobinProposer: virtual public PaceMaker {
clear_promises();
role = CANDIDATE;
last_proposed = nullptr;
- hsc->set_neg_vote(false);
+ hsc->set_vote_disabled(false);
timer = TimerEvent(ec, [this](TimerEvent &) {
candidate_qc_timeout();
});