aboutsummaryrefslogtreecommitdiff
path: root/include/hotstuff/liveness.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hotstuff/liveness.h')
-rw-r--r--include/hotstuff/liveness.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/hotstuff/liveness.h b/include/hotstuff/liveness.h
index 6d3c3cf..f4027a2 100644
--- a/include/hotstuff/liveness.h
+++ b/include/hotstuff/liveness.h
@@ -51,6 +51,7 @@ class PaceMaker {
virtual promise_t beat_resp(ReplicaID last_proposer) = 0;
/** Impeach the current proposer. */
virtual void impeach() {}
+ virtual size_t get_pending_size() = 0;
};
using pacemaker_bt = BoxObj<PaceMaker>;
@@ -166,6 +167,9 @@ class PMWaitQC: public virtual PaceMaker {
}
public:
+
+ size_t get_pending_size() override { return pending_beats.size(); }
+
void init() {
last_proposed = hsc->get_genesis();
locked = false;
@@ -455,6 +459,8 @@ class PMStickyProposer: virtual public PaceMaker {
PMStickyProposer(double qc_timeout, const EventContext &ec):
qc_timeout(qc_timeout), ec(ec) {}
+ size_t get_pending_size() override { return pending_beats.size(); }
+
void init() { to_candidate(); }
ReplicaID get_proposer() override {
@@ -706,6 +712,8 @@ class PMRoundRobinProposer: virtual public PaceMaker {
PMRoundRobinProposer(double qc_timeout, const EventContext &ec):
qc_timeout(qc_timeout), ec(ec), proposer(0) {}
+ size_t get_pending_size() override { return pending_beats.size(); }
+
void init() {
to_candidate();
}