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/consensus.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/consensus.cpp') 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 &cmds, +void HotStuffCore::on_propose(const std::vector &cmds, const std::vector &parents, bytearray_t &&extra) { if (parents.empty()) -- cgit v1.2.3-70-g09d2