From 780cfa4ee8faf4c2662f3c739e8a5c9f1c8a1826 Mon Sep 17 00:00:00 2001 From: Determinant Date: Wed, 18 Jul 2018 14:34:43 -0400 Subject: move parent selection to PaceMaker --- include/hotstuff/consensus.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'include/hotstuff/consensus.h') diff --git a/include/hotstuff/consensus.h b/include/hotstuff/consensus.h index cb18db5..73d47ef 100644 --- a/include/hotstuff/consensus.h +++ b/include/hotstuff/consensus.h @@ -40,14 +40,11 @@ class HotStuffCore { protected: ReplicaID id; /**< identity of the replica itself */ - const int32_t parent_limit; /**< maximum number of parents */ public: BoxObj storage; - HotStuffCore(ReplicaID id, - privkey_bt &&priv_key, - int32_t parent_limit); + HotStuffCore(ReplicaID id, privkey_bt &&priv_key); virtual ~HotStuffCore() = default; /* Inputs of the state machine triggered by external events, should called @@ -73,8 +70,11 @@ class HotStuffCore { * The block mentioned in the message should be already delivered. */ void on_receive_vote(const Vote &vote); - /** Call to submit new commands to be decided (executed). */ - void on_propose(const std::vector &cmds); + /** Call to submit new commands to be decided (executed). "Parents" must + * contain at least one block, and the first block is the actual parent, + * while the others are uncles/aunts */ + void on_propose(const std::vector &cmds, + const std::vector &parents); /* Functions required to construct concrete instances for abstract classes. * */ @@ -127,6 +127,7 @@ class HotStuffCore { const ReplicaConfig &get_config() { return config; } int8_t get_cmd_decision(const uint256_t &cmd_hash); ReplicaID get_id() const { return id; } + const std::set get_tails() const { return tails; } operator std::string () const; }; -- cgit v1.2.3-70-g09d2