aboutsummaryrefslogtreecommitdiff
path: root/include/hotstuff/hotstuff.h
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2018-07-19 17:51:15 -0400
committerDeterminant <[email protected]>2018-07-19 17:51:15 -0400
commit3c355d7f9e7b491b9fc5af4516286ab4100238c6 (patch)
tree7806e385c3c35be4deb82d4a799fc504ed6e90b3 /include/hotstuff/hotstuff.h
parent3c1cac7136b6fbc378c5bc86a50537794f2b6437 (diff)
...
Diffstat (limited to 'include/hotstuff/hotstuff.h')
-rw-r--r--include/hotstuff/hotstuff.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/hotstuff/hotstuff.h b/include/hotstuff/hotstuff.h
index c8d8b5d..45992f1 100644
--- a/include/hotstuff/hotstuff.h
+++ b/include/hotstuff/hotstuff.h
@@ -152,8 +152,13 @@ class HotStuffBase: public HotStuffCore {
void do_broadcast_proposal(const Proposal &) override;
void do_vote(ReplicaID, const Vote &) override;
- void do_decide(const command_t &) override;
- void do_forward(const uint256_t &cmd_hash, ReplicaID rid);
+ void do_decide(Finality &&) override;
+
+ protected:
+
+ /** Called to replicate the execution of a command, the application should
+ * implement this to make transition for the application state. */
+ virtual void state_machine_execute(const Finality &) = 0;
public:
HotStuffBase(uint32_t blk_size,
@@ -182,8 +187,6 @@ class HotStuffBase: public HotStuffCore {
promise_t async_fetch_blk(const uint256_t &blk_hash, const NetAddr *replica_id, bool fetch_now = true);
/** Returns a promise resolved (with block_t blk) when Block is delivered (i.e. prefix is fetched). */
promise_t async_deliver_blk(const uint256_t &blk_hash, const NetAddr &replica_id);
- /** Returns a promise resolved (with command_t cmd) when Command is decided. */
- promise_t async_decide(const uint256_t &cmd_hash);
};
/** HotStuff protocol (templated by cryptographic implementation). */