aboutsummaryrefslogtreecommitdiff
path: root/src/consensus.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/consensus.cpp
parent95b193bb3b0bba62f168c7e2c3f45c54d4849e27 (diff)
let client send cmd data, the replicas should only work on the hash
Diffstat (limited to 'src/consensus.cpp')
-rw-r--r--src/consensus.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/consensus.cpp b/src/consensus.cpp
index c80de59..dbe79b0 100644
--- a/src/consensus.cpp
+++ b/src/consensus.cpp
@@ -50,8 +50,6 @@ bool HotStuffCore::on_deliver_blk(const block_t &blk) {
for (const auto &hash: blk->parent_hashes)
blk->parents.push_back(get_delivered_blk(hash));
blk->height = blk->parents[0]->height + 1;
- for (const auto &cmd: blk->cmds)
- cmd->container = blk;
if (blk->qc)
{
@@ -97,7 +95,7 @@ void HotStuffCore::check_commit(const block_t &_blk) {
size_t idx = 0;
for (auto cmd: blk->cmds)
do_decide(Finality(id, 1, idx, blk->height,
- cmd->get_hash(), blk->get_hash()));
+ cmd, blk->get_hash()));
}
bexec = p;
}
@@ -114,7 +112,7 @@ bool HotStuffCore::update(const uint256_t &bqc_hash) {
return true;
}
-void HotStuffCore::on_propose(const std::vector<command_t> &cmds,
+void HotStuffCore::on_propose(const std::vector<uint256_t> &cmds,
const std::vector<block_t> &parents,
bytearray_t &&extra) {
if (parents.empty())