aboutsummaryrefslogtreecommitdiff
path: root/src/entity.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2018-09-10 20:49:34 -0400
committerDeterminant <[email protected]>2018-09-10 20:49:34 -0400
commitc4d3e5fe66568ccd0732edf7cf80d37959d6abda (patch)
treed21fffc5209fad03bc5ac81f4fee3d3e887dac22 /src/entity.cpp
parent95b193bb3b0bba62f168c7e2c3f45c54d4849e27 (diff)
let client send cmd data, the replicas should only work on the hash
Diffstat (limited to 'src/entity.cpp')
-rw-r--r--src/entity.cpp6
1 files changed, 4 insertions, 2 deletions
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;