Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

sc-finality-grandpa: Warp proof generation can not expect justifications #13249

Merged
merged 1 commit into from
Jan 28, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions client/cli/src/params/pruning_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub struct PruningParams {
/// [default: 256]
#[arg(alias = "pruning", long, value_name = "PRUNING_MODE")]
pub state_pruning: Option<DatabasePruningMode>,

/// Specify the blocks pruning mode.
///
/// This mode specifies when the block's body (including justifications)
Expand Down
6 changes: 1 addition & 5 deletions client/finality-grandpa/src/warp_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,7 @@ impl<Block: BlockT> WarpSyncProof<Block> {
let justification = blockchain
.justifications(header.hash())?
.and_then(|just| just.into_justification(GRANDPA_ENGINE_ID))
.expect(
"header is last in set and contains standard change signal; \
must have justification; \
qed.",
);
.ok_or_else(|| Error::MissingData)?;

let justification = GrandpaJustification::<Block>::decode(&mut &justification[..])?;

Expand Down