From c4d3e5fe66568ccd0732edf7cf80d37959d6abda Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 10 Sep 2018 20:49:34 -0400 Subject: let client send cmd data, the replicas should only work on the hash --- src/entity.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/entity.cpp') diff --git a/src/entity.cpp b/src/entity.cpp index 594fdbe..94b896a 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -9,7 +9,7 @@ void Block::serialize(DataStream &s) const { s << hash; s << htole((uint32_t)cmds.size()); for (auto cmd: cmds) - s << *cmd; + s << cmd; if (qc) s << (uint8_t)1 << *qc; else @@ -29,7 +29,9 @@ void Block::unserialize(DataStream &s, HotStuffCore *hsc) { n = letoh(n); cmds.resize(n); for (auto &cmd: cmds) - cmd = hsc->parse_cmd(s); + s >> cmd; +// for (auto &cmd: cmds) +// cmd = hsc->parse_cmd(s); s >> flag; qc = flag ? hsc->parse_quorum_cert(s) : nullptr; s >> n; -- cgit v1.2.3