Skip to content

Commit

Permalink
Remove finality proof verification
Browse files Browse the repository at this point in the history
  • Loading branch information
serban300 committed Mar 21, 2024
1 parent 2a76cbb commit f334bdd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions primitives/header-chain/src/justification/verification/optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,18 @@ impl<Header: HeaderT> JustificationVerifier<Header> for JustificationOptimizer<H

/// Verify and optimize given justification by removing unknown and duplicate votes.
pub fn verify_and_optimize_justification<Header: HeaderT>(
finalized_target: (Header::Hash, Header::Number),
context: &JustificationVerificationContext,
justification: &mut GrandpaJustification<Header>,
_finalized_target: (Header::Hash, Header::Number),
_context: &JustificationVerificationContext,
_justification: &mut GrandpaJustification<Header>,
) -> Result<(), Error> {
let mut optimizer = JustificationOptimizer {
votes: BTreeSet::new(),
extra_precommits: vec![],
duplicate_votes_ancestries_idxs: vec![],
redundant_votes_ancestries: Default::default(),
};
optimizer.verify_justification(finalized_target, context, justification)?;
optimizer.optimize(justification);
// let mut optimizer = JustificationOptimizer {
// votes: BTreeSet::new(),
// extra_precommits: vec![],
// duplicate_votes_ancestries_idxs: vec![],
// redundant_votes_ancestries: Default::default(),
// };
// optimizer.verify_justification(finalized_target, context, justification)?;
// optimizer.optimize(justification);

Ok(())
}

0 comments on commit f334bdd

Please sign in to comment.