Skip to content

Commit

Permalink
Merge pull request #558 from AntelopeIO/gh_534_2
Browse files Browse the repository at this point in the history
[1.0] Remove unnecessary code that cannot be executed.
  • Loading branch information
greg7mdp authored Aug 15, 2024
2 parents a6327eb + 7c425d6 commit 9d5fde1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libraries/chain/finality/finalizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@ finalizer::vote_result finalizer::decide_vote(const block_state_ptr& bsp) {
// This allows restoration of liveness if a replica is locked on a stale proposal
// -------------------------------------------------------------------------------
res.liveness_check = bsp->core.latest_qc_block_timestamp() > fsi.lock.timestamp;
if (!res.liveness_check) {
// might be locked on an old timestamp if finalizer was active in the past and is now active again
res.liveness_check = bsp->core.last_final_block_timestamp() >= fsi.lock.timestamp;
}

if (!res.liveness_check) {
fc_ilog(vote_logger, "liveness check failed, block ${bn} ${id}: ${c} <= ${l}, fsi.lock ${lbn} ${lid}, latest_qc_claim: ${qc}",
("bn", bsp->block_num())("id", bsp->id())("c", bsp->core.latest_qc_block_timestamp())("l", fsi.lock.timestamp)
("lbn", fsi.lock.block_num())("lid", fsi.lock.block_id)
("qc", bsp->core.latest_qc_claim()));

// Safety check : check if this proposal extends the proposal we're locked on
res.safety_check = bsp->core.extends(fsi.lock.block_id);
if (!res.safety_check) {
Expand Down

0 comments on commit 9d5fde1

Please sign in to comment.