diff options
Diffstat (limited to 'include/hotstuff')
-rw-r--r-- | include/hotstuff/entity.h | 3 | ||||
-rw-r--r-- | include/hotstuff/liveness.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/hotstuff/entity.h b/include/hotstuff/entity.h index 29300a9..6f73db8 100644 --- a/include/hotstuff/entity.h +++ b/include/hotstuff/entity.h @@ -196,7 +196,8 @@ class Block { s << "<block " << "id=" << get_hex10(hash) << " " << "height=" << std::to_string(height) << " " - << "parent=" << get_hex10(parent_hashes[0]) << ">"; + << "parent=" << get_hex10(parent_hashes[0]) << " " + << "qc_ref=" << (qc_ref ? get_hex10(qc_ref->get_hash()) : "null") << ">"; return std::move(s); } }; diff --git a/include/hotstuff/liveness.h b/include/hotstuff/liveness.h index 5dfb2e0..6396fe3 100644 --- a/include/hotstuff/liveness.h +++ b/include/hotstuff/liveness.h @@ -52,8 +52,8 @@ class PMAllParents: public virtual PaceMaker { for (b = blk; b->get_height() > bqc->get_height(); b = b->get_parents()[0]); - if (b == bqc && b->get_height() > bqc_tail->get_height()) - bqc_tail = b; + if (b == bqc && blk->get_height() > bqc_tail->get_height()) + bqc_tail = blk; } reg_bqc_update(); }); |