diff options
author | Determinant <[email protected]> | 2019-04-08 10:53:02 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-04-08 10:53:02 -0400 |
commit | 4360a816bd31a2520c3a2cefcd780e157ec3e4cb (patch) | |
tree | 92f15e532e4f641f0f6860442183bafde6fff16c /src/consensus.cpp | |
parent | 491753f5191f4ec74a4d8129797f375aa2b24ece (diff) |
fix minor bug
Diffstat (limited to 'src/consensus.cpp')
-rw-r--r-- | src/consensus.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/consensus.cpp b/src/consensus.cpp index b57e258..d801de8 100644 --- a/src/consensus.cpp +++ b/src/consensus.cpp @@ -119,10 +119,9 @@ void HotStuffCore::update(const block_t &nblk) { const block_t &blk = *it; blk->decision = 1; LOG_PROTO("commit %s", std::string(*blk).c_str()); - size_t idx = 0; - for (auto cmd: blk->cmds) - do_decide(Finality(id, 1, idx, blk->height, - cmd, blk->get_hash())); + for (size_t i = 0; i < blk->cmds.size(); i++) + do_decide(Finality(id, 1, i, blk->height, + blk->cmds[i], blk->get_hash())); } bexec = p; } |