From 4f21297a2f1bcb8dc9ceab2f337dea49470a2b4c Mon Sep 17 00:00:00 2001 From: hrxi Date: Fri, 18 Oct 2024 16:56:00 +0200 Subject: [PATCH] Don't check round in block header of double proposal proofs The round in the proposal message is the relevant one. --- primitives/block/src/equivocation_proof.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/primitives/block/src/equivocation_proof.rs b/primitives/block/src/equivocation_proof.rs index 6bfec9a54..716151a03 100644 --- a/primitives/block/src/equivocation_proof.rs +++ b/primitives/block/src/equivocation_proof.rs @@ -372,7 +372,7 @@ impl DoubleProposalProof { } /// Round of the proposals. pub fn round(&self) -> u32 { - self.proposal1.proposal.round + self.proposal1.round } /// Hash of header number 1. pub fn header1_hash(&self) -> Blake2bHash { @@ -404,7 +404,6 @@ impl DoubleProposalProof { } if self.proposal1.proposal.block_number != self.proposal2.proposal.block_number - || self.proposal1.proposal.round != self.proposal2.proposal.round || self.proposal1.round != self.proposal2.round { return Err(EquivocationProofError::SlotMismatch); @@ -810,8 +809,8 @@ mod test { let proposals: Vec<_> = headers .into_iter() .map(|header| TendermintProposal { + round: header.round, proposal: header, - round: 0, valid_round: None, }) .collect();