diff options
author | Determinant <[email protected]> | 2018-08-03 20:14:42 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2018-08-03 20:14:42 -0400 |
commit | 086e37788e16ddf62c0676a223002a3ea1b6d2e0 (patch) | |
tree | ee222cc3f81ac2f1bb6539d33111f70b62bbbaa9 /include/hotstuff/entity.h | |
parent | edcadfb47b736e6c9dd6b078689114aecf5c1add (diff) |
...
Diffstat (limited to 'include/hotstuff/entity.h')
-rw-r--r-- | include/hotstuff/entity.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/hotstuff/entity.h b/include/hotstuff/entity.h index dc77c81..ce7d9bf 100644 --- a/include/hotstuff/entity.h +++ b/include/hotstuff/entity.h @@ -102,14 +102,12 @@ get_hashes(const std::vector<Hashable> &plist) { return std::move(hashes); } -using serializable_bt = BoxObj<Serializable>; - class Block { friend HotStuffCore; std::vector<uint256_t> parent_hashes; std::vector<command_t> cmds; quorum_cert_bt qc; - serializable_bt extra; + bytearray_t extra; /* the following fields can be derived from above */ uint256_t hash; @@ -125,14 +123,12 @@ class Block { public: Block(): qc(nullptr), - extra(nullptr), qc_ref(nullptr), self_qc(nullptr), height(0), delivered(false), decision(0) {} Block(bool delivered, int8_t decision): qc(nullptr), - extra(nullptr), hash(salticidae::get_hash(*this)), qc_ref(nullptr), self_qc(nullptr), height(0), @@ -141,7 +137,7 @@ class Block { Block(const std::vector<block_t> &parents, const std::vector<command_t> &cmds, quorum_cert_bt &&qc, - serializable_bt &&extra, + bytearray_t &&extra, uint32_t height, const block_t &qc_ref, quorum_cert_bt &&self_qc, @@ -193,7 +189,7 @@ class Block { const block_t &get_qc_ref() const { return qc_ref; } - const serializable_bt &get_extra() const { return extra; } + const bytearray_t &get_extra() const { return extra; } operator std::string () const { DataStream s; |