aboutsummaryrefslogtreecommitdiff
path: root/src/consensus.cpp
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2018-08-07 17:27:57 -0400
committerDeterminant <tederminant@gmail.com>2018-08-07 17:27:57 -0400
commit062a1368abaa44585dcc4ea9b11e46708dbb418c (patch)
tree6ea1955ed1c81c93ee725c650fb4335454971afb /src/consensus.cpp
parent086e37788e16ddf62c0676a223002a3ea1b6d2e0 (diff)
sticky pace maker seems to work
Diffstat (limited to 'src/consensus.cpp')
-rw-r--r--src/consensus.cpp10
1 files changed, 7 insertions, 3 deletions
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) {