From 4c42ac64c2ff821306609898a58126f2da32c7d4 Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 2 Aug 2018 20:26:21 -0400 Subject: WIP: sticky proposer pacemaker --- include/hotstuff/consensus.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hotstuff/consensus.h') diff --git a/include/hotstuff/consensus.h b/include/hotstuff/consensus.h index 1ff8f79..a373a2b 100644 --- a/include/hotstuff/consensus.h +++ b/include/hotstuff/consensus.h @@ -31,6 +31,7 @@ class HotStuffCore { /* === async event queues === */ std::unordered_map qc_waiting; promise_t propose_waiting; + promise_t receive_proposal_waiting; block_t get_delivered_blk(const uint256_t &blk_hash); void sanity_check_delivered(const block_t &blk); @@ -38,6 +39,7 @@ class HotStuffCore { bool update(const uint256_t &bqc_hash); void on_qc_finish(const block_t &blk); void on_propose_(const block_t &blk); + void on_deliver_blk_(const block_t &blk); protected: ReplicaID id; /**< identity of the replica itself */ @@ -125,6 +127,8 @@ class HotStuffCore { promise_t async_qc_finish(const block_t &blk); /** Get a promise resolved when a new block is proposed. */ promise_t async_wait_propose(); + /** Get a promise resolved when a new proposal is received. */ + promise_t async_wait_receive_proposal(); /* Other useful functions */ block_t get_genesis() { return b0; } -- cgit v1.2.3-70-g09d2