From 24b6cea7be8b78eaa3681d6274d671057ed112b5 Mon Sep 17 00:00:00 2001 From: Determinant Date: Sat, 6 Jul 2019 18:37:11 -0400 Subject: finish the simple Round-Robin Pacemaker --- include/hotstuff/hotstuff.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/hotstuff/hotstuff.h') diff --git a/include/hotstuff/hotstuff.h b/include/hotstuff/hotstuff.h index ffc5e3d..291f9a7 100644 --- a/include/hotstuff/hotstuff.h +++ b/include/hotstuff/hotstuff.h @@ -27,7 +27,6 @@ #include "salticidae/msg.h" #include "hotstuff/util.h" #include "hotstuff/consensus.h" -#include "hotstuff/liveness.h" namespace hotstuff { @@ -82,6 +81,7 @@ struct MsgRespBlock { using promise::promise_t; class HotStuffBase; +using pacemaker_bt = BoxObj; template class FetchContext: public promise_t { @@ -140,6 +140,7 @@ class HotStuffBase: public HotStuffCore { size_t blk_size; /** libevent handle */ EventContext ec; + salticidae::ThreadCall tcall; VeriPool vpool; std::vector peers; @@ -223,8 +224,10 @@ class HotStuffBase: public HotStuffCore { bool ec_loop = false); size_t size() const { return peers.size(); } - PaceMaker &get_pace_maker() { return *pmaker; } + auto get_decision_waiting() const { return decision_waiting; } + PaceMaker *get_pace_maker() { return pmaker.get(); } void print_stat() const; + virtual void do_elected(); //#ifdef HOTSTUFF_AUTOCLI // virtual void do_demand_commands(size_t) {} //#endif -- cgit v1.2.3