mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 11:01:01 +00:00
committed by
Bastian Köcher
parent
9deea5d251
commit
5e4358a727
@@ -232,7 +232,11 @@ fn contextual_checks<Submitter>(
|
|||||||
let parent_step = context.parent_header().step().ok_or(Error::MissingStep)?;
|
let parent_step = context.parent_header().step().ok_or(Error::MissingStep)?;
|
||||||
|
|
||||||
// Ensure header is from the step after context.
|
// 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);
|
return Err(Error::DoubleVote);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user