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 Nov 11, 2024
1 parent bca9ffe commit 5d80816
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 @@ -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();
Expand Down

0 comments on commit 5d80816

Please sign in to comment.