aboutsummaryrefslogtreecommitdiff
path: root/src/consensus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/consensus.cpp')
-rw-r--r--src/consensus.cpp10
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,