Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fixup: avoid underflow issue
Browse files Browse the repository at this point in the history
  • Loading branch information
drahnr committed Aug 31, 2021
1 parent 139ecf9 commit 336cbe2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/service/src/relay_chain_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ where

let (lag, subchain_head) = if cfg!(feature = "disputes") {
// Prevent sending flawed data to the dispute-coordinator.
if Some(subchain_block_descriptions.len() as u32 - 1) !=
subchain_number.checked_sub(target_number)
if Some(subchain_block_descriptions.len() as u64) !=
(subchain_number + 1_u64).checked_sub(target_number)
{
tracing::error!(
LOG_TARGET,
Expand Down

0 comments on commit 336cbe2

Please sign in to comment.