Skip to content

Commit

Permalink
fix: remove potential u64 overflow panic (tari-project#5686)
Browse files Browse the repository at this point in the history
Description
---
simplify if and remove potential u64 mx overflow panix

---------

Co-authored-by: stringhandler <stringhandler@gmail.com>
  • Loading branch information
SWvheerden and stringhandler committed Aug 30, 2023
1 parent f261b79 commit 90a8a21
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -293,9 +293,7 @@ fn determine_sync_mode(
);

// This is to test the block propagation by delaying lagging.
if local_tip_height + blocks_behind_before_considered_lagging > network_tip_height &&
local_tip_height < network_tip_height + blocks_behind_before_considered_lagging
{
if local_tip_height.saturating_add(blocks_behind_before_considered_lagging) > network_tip_height {
info!(
target: LOG_TARGET,
"While we are behind, we are still within {} blocks of them, so we are staying as listening and \
Expand Down

0 comments on commit 90a8a21

Please sign in to comment.