Unverified Commit a1b08f94 authored by asynchronous rob's avatar asynchronous rob Committed by GitHub
Browse files

properly gate sanity check (#3684)

parent 1371cfc7
Pipeline #153762 passed with stages
in 39 minutes and 8 seconds
......@@ -412,24 +412,23 @@ where
}
};
// Prevent sending flawed data to the dispute-coordinator.
if Some(subchain_block_descriptions.len() as _) !=
subchain_number.checked_sub(target_number)
{
tracing::error!(
LOG_TARGET,
present_block_descriptions = subchain_block_descriptions.len(),
target_number,
subchain_number,
"Mismatch of anticipated block descriptions and block number difference.",
);
return Ok(Some(target_hash))
}
let lag = initial_leaf_number.saturating_sub(subchain_number);
self.metrics.note_approval_checking_finality_lag(lag);
let lag = if cfg!(feature = "disputes") {
// Prevent sending flawed data to the dispute-coordinator.
if Some(subchain_block_descriptions.len() as _) !=
subchain_number.checked_sub(target_number)
{
tracing::error!(
LOG_TARGET,
present_block_descriptions = subchain_block_descriptions.len(),
target_number,
subchain_number,
"Mismatch of anticipated block descriptions and block number difference.",
);
return Ok(Some(target_hash))
}
// 3. Constrain according to disputes:
let (tx, rx) = oneshot::channel();
overseer
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment