diff --git a/consensus/src/operations.rs b/consensus/src/operations.rs index 482f48fcc..d4808e16f 100644 --- a/consensus/src/operations.rs +++ b/consensus/src/operations.rs @@ -81,10 +81,9 @@ impl fmt::Display for VerificationOutput { #[async_trait::async_trait] pub trait Operations: Send + Sync { - async fn verify_block_header( + async fn verify_candidate_header( &self, candidate_header: &Header, - disable_winning_att_check: bool, ) -> Result<(u8, Vec, Vec), Error>; async fn verify_faults( diff --git a/consensus/src/validation/step.rs b/consensus/src/validation/step.rs index 9484ca01b..691f0aa55 100644 --- a/consensus/src/validation/step.rs +++ b/consensus/src/validation/step.rs @@ -79,9 +79,8 @@ impl ValidationStep { let candidate = candidate.expect("Candidate to be already checked"); let header = candidate.header(); - // Verify candidate header (all fields except the winning attestation) - // NB: Winning attestation is produced only on reaching consensus - let vote = match executor.verify_block_header(header, true).await { + // Verify candidate header + let vote = match executor.verify_candidate_header(header).await { Ok((_, voters, _)) => { // Call Verify State Transition to make sure transactions set is // valid diff --git a/node/src/chain/consensus.rs b/node/src/chain/consensus.rs index d8150151b..a7096c7ef 100644 --- a/node/src/chain/consensus.rs +++ b/node/src/chain/consensus.rs @@ -252,10 +252,9 @@ impl Executor { #[async_trait::async_trait] impl Operations for Executor { - async fn verify_block_header( + async fn verify_candidate_header( &self, candidate_header: &Header, - disable_winning_att_check: bool, ) -> Result<(u8, Vec, Vec), Error> { let validator = Validator::new( self.db.clone(), @@ -264,7 +263,7 @@ impl Operations for Executor { ); validator - .execute_checks(candidate_header, disable_winning_att_check) + .execute_checks(candidate_header, true) .await .map_err(operations::Error::InvalidHeader) }