diff options
author | Determinant <[email protected]> | 2018-07-19 17:51:15 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2018-07-19 17:51:15 -0400 |
commit | 3c355d7f9e7b491b9fc5af4516286ab4100238c6 (patch) | |
tree | 7806e385c3c35be4deb82d4a799fc504ed6e90b3 /src/consensus.cpp | |
parent | 3c1cac7136b6fbc378c5bc86a50537794f2b6437 (diff) |
...
Diffstat (limited to 'src/consensus.cpp')
-rw-r--r-- | src/consensus.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/consensus.cpp b/src/consensus.cpp index 6b8b398..57152f0 100644 --- a/src/consensus.cpp +++ b/src/consensus.cpp @@ -91,7 +91,10 @@ void HotStuffCore::check_commit(const block_t &_blk) { #ifdef HOTSTUFF_ENABLE_LOG_PROTO LOG_INFO("commit %s", std::string(*blk).c_str()); #endif - for (auto cmd: blk->cmds) do_decide(cmd); + size_t idx = 0; + for (auto cmd: blk->cmds) + do_decide(Finality(id, 1, idx, blk->height, + cmd->get_hash(), blk->get_hash())); } bexec = p; } @@ -238,11 +241,6 @@ void HotStuffCore::prune(uint32_t staleness) { } } -int8_t HotStuffCore::get_cmd_decision(const uint256_t &cmd_hash) { - auto cmd = storage->find_cmd(cmd_hash); - return cmd != nullptr ? cmd->get_decision() : 0; -} - void HotStuffCore::add_replica(ReplicaID rid, const NetAddr &addr, pubkey_bt &&pub_key) { config.add_replica(rid, |