Fix clippy warning (#591)

* clippy

* still clippy

* clippy again
This commit is contained in:
Svyatoslav Nikolsky
2020-12-21 19:00:35 +03:00
committed by Bastian Köcher
parent 9deea5d251
commit 5e4358a727
+5 -1
View File
@@ -232,7 +232,11 @@ fn contextual_checks<Submitter>(
let parent_step = context.parent_header().step().ok_or(Error::MissingStep)?;
// Ensure header is from the step after context.
if header_step == parent_step || (header.number >= config.validate_step_transition && header_step <= parent_step) {
if header_step == parent_step {
return Err(Error::DoubleVote);
}
#[allow(clippy::suspicious_operation_groupings)]
if header.number >= config.validate_step_transition && header_step < parent_step {
return Err(Error::DoubleVote);
}