Skip to content

Commit

Permalink
fix: missing parents sync (#189)
Browse files Browse the repository at this point in the history
Description
---
fixes comparisons in missing sync
  • Loading branch information
SWvheerden authored Nov 27, 2024
1 parent 39ebcb6 commit b34fb07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/p2p/network.rs
Original file line number Diff line number Diff line change
@@ -676,8 +676,8 @@ where S: ShareChain
return Ok(MessageAcceptance::Accept);
}

if our_tip > max_payload_height.saturating_sub(10) ||
our_tip < max_payload_height.saturating_add(5)
if our_tip.saturating_sub(10) < max_payload_height ||
our_tip.saturating_add(5) > max_payload_height
{
info!(target: LOG_TARGET, squad = &self.config.squad; "Our tip({}) is too far off their new block({}) waiting for sync", our_tip, max_payload_height);
return Ok(MessageAcceptance::Accept);

0 comments on commit b34fb07

Please sign in to comment.