Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
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
Prev Previous commit
Next Next commit
for the greater good
  • Loading branch information
cecton committed May 29, 2020
commit a5bc4bda6bd7ccc1b991ab74378a2535d3e5a5e8
9 changes: 5 additions & 4 deletions network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,18 @@ where
.map_err(|e| Box::new(ClientError::Msg(format!("Failed to decode parachain head: {:?}", e))) as Box<_>)?;
let known_best_number = parent_head.header.number();

if block_number >= known_best_number {
return Ok(if block_number >= known_best_number {
trace!(
target: "cumulus-network",
"validation failed because a justification is needed if this is a new best \
block",
);

return Ok(Validation::Failure);
}
Validation::Failure
} else {
Validation::Success
});

return Ok(Validation::Success);
}

// Check data is a gossip message.
Expand Down