Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions beacon_node/network/src/sync/peer_sync_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ pub fn remote_sync_type<T: BeaconChainTypes>(
) -> PeerSyncType {
// auxiliary variables for clarity: Inclusive boundaries of the range in which we consider a peer's
// head "near" ours.
let near_range_start = local.head_slot - SLOT_IMPORT_TOLERANCE as u64;
let near_range_end = local.head_slot + SLOT_IMPORT_TOLERANCE as u64;
let near_range_start = local.head_slot.saturating_sub(SLOT_IMPORT_TOLERANCE);
let near_range_end = local.head_slot.saturating_add(SLOT_IMPORT_TOLERANCE);

match remote.finalized_epoch.cmp(&local.finalized_epoch) {
Ordering::Less => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl<T: BeaconChainTypes> ChainCollection<T> {
RangeSyncState::Head(syncing_head_ids)
};
} else {
// we removed a head chain, or an stoped finalized chain
// we removed a head chain, or an stopped finalized chain
debug_assert!(!was_syncing || sync_type != RangeSyncType::Finalized);
}
}
Expand Down
Loading