diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/hotstuff/hotstuff.h | 2 | ||||
-rw-r--r-- | include/hotstuff/liveness.h | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/hotstuff/hotstuff.h b/include/hotstuff/hotstuff.h index 41c83b4..b0a6827 100644 --- a/include/hotstuff/hotstuff.h +++ b/include/hotstuff/hotstuff.h @@ -128,7 +128,6 @@ class HotStuffBase: public HotStuffCore { size_t blk_size; /** libevent handle */ EventContext eb; - pacemaker_bt pmaker; private: /** whether libevent handle is owned by itself */ @@ -138,6 +137,7 @@ class HotStuffBase: public HotStuffCore { #ifdef HOTSTUFF_BLK_PROFILE BlockProfiler blk_profiler; #endif + pacemaker_bt pmaker; /* queues for async tasks */ std::unordered_map<const uint256_t, BlockFetchContext> blk_fetch_waiting; std::unordered_map<const uint256_t, BlockDeliveryContext> blk_delivery_waiting; diff --git a/include/hotstuff/liveness.h b/include/hotstuff/liveness.h index c87a242..c3d7d73 100644 --- a/include/hotstuff/liveness.h +++ b/include/hotstuff/liveness.h @@ -166,7 +166,7 @@ class PaceMakerDummyFixed: public PaceMakerDummy { * sees such new QC, if the QC is given by itself, it becomes the proposer, * otherwise yields to the creator of the QC as a follower. */ -class PMStickyProposer: public PMWaitQC { +class PMStickyProposer: virtual public PaceMaker { enum { PROPOSER, FOLLOWER, @@ -340,7 +340,7 @@ class PMStickyProposer: public PMWaitQC { public: void init(HotStuffCore *hsc) override { - PMWaitQC::init(hsc); + PaceMaker::init(hsc); to_candidate(); } @@ -370,6 +370,11 @@ class PMStickyProposer: public PMWaitQC { } }; +struct PaceMakerSticky: public PMAllParents, public PMStickyProposer { + PaceMakerSticky(int32_t parent_limit): + PMAllParents(parent_limit), PMStickyProposer() {} +}; + } #endif |