Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check epoch in verify_order_vote_proposal #13711

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion consensus/safety-rules/src/safety_rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ impl SafetyRules {
}

pub(crate) fn verify_order_vote_proposal(
&self,
&mut self,
order_vote_proposal: &OrderVoteProposal,
) -> Result<(), Error> {
let proposed_block = order_vote_proposal.block();
let safety_data = self.persistent_storage.safety_data()?;

self.verify_epoch(proposed_block.epoch(), &safety_data)?;

let qc = order_vote_proposal.quorum_cert();
if qc.certified_block() != order_vote_proposal.block_info() {
return Err(Error::InvalidOneChainQuorumCertificate(
Expand Down
Loading