Skip to content

Commit

Permalink
Allow justifications on non-finalized blocks (paritytech#1211)
Browse files Browse the repository at this point in the history
One assertion was unnecessary because of the check right above it,
second assertion resolves
paritytech#1159

---------

Co-authored-by: Bastian Köcher <[email protected]>
  • Loading branch information
nazar-pc and bkchr authored Sep 12, 2023
1 parent 09630fc commit ee6eeb7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion substrate/client/consensus/grandpa/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,6 @@ where
.into(),
))
}
assert!(block.justifications.is_some());
let mut authority_set = self.authority_set.inner_locked();
authority_set.authority_set_changes.insert(number);
crate::aux_schema::update_authority_set::<Block, _, _>(
Expand Down
2 changes: 0 additions & 2 deletions substrate/client/service/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,6 @@ where
.block_gap
.map_or(false, |(start, _)| *import_headers.post().number() == start);

assert!(justifications.is_some() && finalized || justifications.is_none() || gap_block);

// the block is lower than our last finalized block so it must revert
// finality, refusing import.
if status == blockchain::BlockStatus::Unknown &&
Expand Down

0 comments on commit ee6eeb7

Please sign in to comment.