diff options
author | Determinant <[email protected]> | 2018-08-03 18:09:01 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2018-08-03 18:09:01 -0400 |
commit | edcadfb47b736e6c9dd6b078689114aecf5c1add (patch) | |
tree | ae292e6448e8f078b735ce8b4ff7537986f26a48 /include/hotstuff/consensus.h | |
parent | 8b912c47e19353a419c8717f7a839b0d63f5cc6c (diff) |
allow extra data in blocks
Diffstat (limited to 'include/hotstuff/consensus.h')
-rw-r--r-- | include/hotstuff/consensus.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/hotstuff/consensus.h b/include/hotstuff/consensus.h index 1528b40..85c1e8c 100644 --- a/include/hotstuff/consensus.h +++ b/include/hotstuff/consensus.h @@ -80,7 +80,8 @@ class HotStuffCore { * 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<command_t> &cmds, - const std::vector<block_t> &parents); + const std::vector<block_t> &parents, + serializable_bt &&extra = nullptr); /* Functions required to construct concrete instances for abstract classes. * */ @@ -113,6 +114,8 @@ class HotStuffCore { virtual quorum_cert_bt parse_quorum_cert(DataStream &s) = 0; /** Create a command object from its serialized form. */ virtual command_t parse_cmd(DataStream &s) = 0; + /** Create the extra data from its serialized form. */ + virtual serializable_bt parse_extra_block_data(DataStream &) { return nullptr; } public: /** Add a replica to the current configuration. This should only be called |