Skip to content

Commit

Permalink
Don't check round in block header of double proposal proofs
Browse files Browse the repository at this point in the history
The round in the proposal message is the relevant one.
  • Loading branch information
hrxi committed Oct 21, 2024
1 parent eae6cff commit 263c16e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions primitives/block/src/equivocation_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -809,8 +808,8 @@ mod test {
let proposals: Vec<_> = headers
.into_iter()
.map(|header| TendermintProposal {
round: header.round,
proposal: header,
round: 0,
valid_round: None,
})
.collect();
Expand Down

0 comments on commit 263c16e

Please sign in to comment.