diff options
author | Determinant <[email protected]> | 2018-09-03 00:13:58 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2018-09-03 00:13:58 -0400 |
commit | c3368b286fbb1d6b8c22af8ce21e57b5a5720445 (patch) | |
tree | 061de96c58873f642a24a151af1bf7ed937fb1c3 /include/hotstuff/client.h | |
parent | 2535cd89c13485cc4a8e68145c7cb5e8e9398e5c (diff) | |
parent | 17f7fd821cf71717a158e2c38699baa6ab2f2af8 (diff) |
Merge branch 'master' of github.com:Determinant/hot-stuff
Diffstat (limited to 'include/hotstuff/client.h')
-rw-r--r-- | include/hotstuff/client.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/hotstuff/client.h b/include/hotstuff/client.h index 92b4eec..447a9db 100644 --- a/include/hotstuff/client.h +++ b/include/hotstuff/client.h @@ -26,8 +26,8 @@ struct MsgRespCmd { }; class CommandDummy: public Command { - static uint64_t cnt; - uint64_t n; + uint32_t cid; + uint32_t n; uint256_t hash; public: @@ -36,19 +36,15 @@ class CommandDummy: public Command { ~CommandDummy() override {} - CommandDummy(uint64_t n): - n(n), hash(salticidae::get_hash(*this)) {} - - static command_t make_cmd() { - return new CommandDummy(cnt++); - } + CommandDummy(uint32_t cid, uint32_t n): + cid(cid), n(n), hash(salticidae::get_hash(*this)) {} void serialize(DataStream &s) const override { - s << n; + s << cid << n; } void unserialize(DataStream &s) override { - s >> n; + s >> cid >> n; hash = salticidae::get_hash(*this); } |