aboutsummaryrefslogtreecommitdiff
path: root/include/hotstuff/entity.h
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2018-07-17 20:02:52 -0400
committerDeterminant <[email protected]>2018-07-17 20:02:52 -0400
commite08bf4e6a40cf82822c50b1433a573d0d8800f80 (patch)
tree6b3ea8cabf94719f96dbacd176029a207a3920a6 /include/hotstuff/entity.h
parent02e347dae1a01172dbcc2efe054014c015d96507 (diff)
add PaceMakerDummyFixed
Diffstat (limited to 'include/hotstuff/entity.h')
-rw-r--r--include/hotstuff/entity.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/include/hotstuff/entity.h b/include/hotstuff/entity.h
index 00c64a6..03aff06 100644
--- a/include/hotstuff/entity.h
+++ b/include/hotstuff/entity.h
@@ -73,26 +73,6 @@ class HotStuffCore;
using block_t = salticidae::RcObj<Block>;
using block_weak_t = salticidae::WeakObj<Block>;
-struct Finality: public Serializable {
- int8_t decision;
- uint256_t blk_hash;
-
- public:
- Finality(): decision(0) {}
- Finality(int8_t decision, uint256_t blk_hash):
- decision(decision), blk_hash(blk_hash) {}
-
- void serialize(DataStream &s) const override {
- s << decision;
- if (decision == 1) s << blk_hash;
- }
-
- void unserialize(DataStream &s) override {
- s >> decision;
- if (decision == 1) s >> blk_hash;
- }
-};
-
class Command: public Serializable {
friend HotStuffCore;
block_weak_t container;
@@ -101,7 +81,6 @@ class Command: public Serializable {
virtual const uint256_t &get_hash() const = 0;
virtual bool verify() const = 0;
inline int8_t get_decision() const;
- inline Finality get_finality() const;
block_t get_container() const {
return container;
}
@@ -220,12 +199,6 @@ int8_t Command::get_decision() const {
return cptr ? cptr->get_decision() : 0;
}
-Finality Command::get_finality() const {
- block_t blk = get_container();
- return Finality(get_decision(),
- blk ? blk->get_hash() : uint256_t());
-}
-
class EntityStorage {
std::unordered_map<const uint256_t, block_t> blk_cache;
std::unordered_map<const uint256_t, command_t> cmd_cache;