Skip to content

Commit

Permalink
skaled-1199-add-more-logs
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Jan 26, 2024
1 parent ddde155 commit 247220f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion catchup/client/CatchupClientAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,12 @@ constexpr uint64_t ALLOWED_CATCHUP_DELAY_S = 30;
// we always set is_syncing to false. This is is to prevent nodes that
// are just a little behing to flip back and forth into is_syncing
if (Time::getCurrentTimeSec() < getSchain()->getLastCommittedBlockTimeStamp().getS() + ALLOWED_CATCHUP_DELAY_S) {
LOG(info, "TOO EARLY TO REQUEST CATCHUP INFORMATION\n");
return syncInfo;
}

LOG(info, "LAST COMMITED BLOCK: " << getSchain()->getLastCommittedBlockID() );

// find the maximum block on peer nodes
uint64_t highestBlock = 0;
{
Expand All @@ -379,6 +382,7 @@ constexpr uint64_t ALLOWED_CATCHUP_DELAY_S = 30;
}
}
}
LOG(info, "HIGHEST BLOCK AMONG OTHER PEERS: " << highestBlock );

// no peer has a block larger than last committed block
// return is_syncing false
Expand All @@ -396,4 +400,4 @@ constexpr uint64_t ALLOWED_CATCHUP_DELAY_S = 30;

return syncInfo;

}
}

0 comments on commit 247220f

Please sign in to comment.