aboutsummaryrefslogtreecommitdiff
path: root/src/entity.cpp
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2018-09-10 20:50:26 -0400
committerDeterminant <ted.sybil@gmail.com>2018-09-10 20:50:26 -0400
commit570f335740f152e8042d717b0bf39f2e6cc5effa (patch)
treed21fffc5209fad03bc5ac81f4fee3d3e887dac22 /src/entity.cpp
parent8d5449339d3dacc31c614e27669ce6eb9eb11960 (diff)
parentc4d3e5fe66568ccd0732edf7cf80d37959d6abda (diff)
Merge branch 'master' of /home/ymf/lwork/hot-stuff/code
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;