diff options
author | Determinant <[email protected]> | 2018-07-19 17:51:15 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2018-07-19 17:51:15 -0400 |
commit | 3c355d7f9e7b491b9fc5af4516286ab4100238c6 (patch) | |
tree | 7806e385c3c35be4deb82d4a799fc504ed6e90b3 /include/hotstuff/entity.h | |
parent | 3c1cac7136b6fbc378c5bc86a50537794f2b6437 (diff) |
...
Diffstat (limited to 'include/hotstuff/entity.h')
-rw-r--r-- | include/hotstuff/entity.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/include/hotstuff/entity.h b/include/hotstuff/entity.h index 28b5148..1fca18c 100644 --- a/include/hotstuff/entity.h +++ b/include/hotstuff/entity.h @@ -80,9 +80,10 @@ class Command: public Serializable { virtual ~Command() = default; virtual const uint256_t &get_hash() const = 0; virtual bool verify() const = 0; - inline int8_t get_decision() const; - block_t get_container() const { - return container; + virtual operator std::string () const { + DataStream s; + s << "<cmd id=" << get_hex10(get_hash()) << ">"; + return std::move(s); } }; @@ -194,11 +195,6 @@ struct BlockHeightCmp { } }; -int8_t Command::get_decision() const { - block_t cptr = container; - return cptr ? cptr->get_decision() : 0; -} - class EntityStorage { std::unordered_map<const uint256_t, block_t> blk_cache; std::unordered_map<const uint256_t, command_t> cmd_cache; |