From 062a1368abaa44585dcc4ea9b11e46708dbb418c Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 7 Aug 2018 17:27:57 -0400 Subject: sticky pace maker seems to work --- src/consensus.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/consensus.cpp') diff --git a/src/consensus.cpp b/src/consensus.cpp index 6505c20..58c0f31 100644 --- a/src/consensus.cpp +++ b/src/consensus.cpp @@ -173,7 +173,7 @@ void HotStuffCore::on_receive_proposal(const Proposal &prop) { #ifdef HOTSTUFF_PROTO_LOG LOG_INFO("now state: %s", std::string(*this).c_str()); #endif - if (bnew->qc_ref) on_qc_finish(bnew); + if (bnew->qc_ref) on_qc_finish(bnew->qc_ref); on_receive_proposal_(prop); do_vote(prop.proposer, Vote(id, @@ -271,11 +271,15 @@ void HotStuffCore::on_qc_finish(const block_t &blk) { } promise_t HotStuffCore::async_wait_propose() { - return propose_waiting; + return propose_waiting.then([](const block_t &blk) { + return blk; + }); } promise_t HotStuffCore::async_wait_receive_proposal() { - return receive_proposal_waiting; + return receive_proposal_waiting.then([](const Proposal &prop) { + return prop; + }); } void HotStuffCore::on_propose_(const block_t &blk) { -- cgit v1.2.3-70-g09d2