From 5e4358a72751be7a8cd56747d0229962549d7b4d Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Mon, 21 Dec 2020 19:00:35 +0300 Subject: [PATCH] Fix clippy warning (#591) * clippy * still clippy * clippy again --- bridges/modules/ethereum/src/verification.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bridges/modules/ethereum/src/verification.rs b/bridges/modules/ethereum/src/verification.rs index b762a280f5..aac1d20067 100644 --- a/bridges/modules/ethereum/src/verification.rs +++ b/bridges/modules/ethereum/src/verification.rs @@ -232,7 +232,11 @@ fn contextual_checks( 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); }