From 3a56c566f1699b4b9e1db4db3b3090a45bdb0a93 Mon Sep 17 00:00:00 2001 From: Vladislav Date: Mon, 30 Oct 2023 10:57:22 -0300 Subject: [PATCH] Fix grandpa client required update usage (#432) * Fix grandpa client required update usage Signed-off-by: Vladislav --- hyperspace/parachain/src/finality_protocol.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyperspace/parachain/src/finality_protocol.rs b/hyperspace/parachain/src/finality_protocol.rs index 7e3cbb8ea..de8ee903f 100644 --- a/hyperspace/parachain/src/finality_protocol.rs +++ b/hyperspace/parachain/src/finality_protocol.rs @@ -456,7 +456,7 @@ where ::AccountId: Send + Sync, ::Address: Send + Sync, { - let _justification = match finality_event { + let latest_justification = match finality_event { FinalityEvent::Grandpa(justification) => justification, _ => panic!("Expected grandpa finality event"), }; @@ -635,7 +635,7 @@ where // checkpoints so we don't end up with a very large finality proof at the session end. let is_update_required = source .is_update_required( - justification.commit.target_number.into(), + latest_justification.commit.target_number.into(), client_state.latest_relay_height.into(), ) .await?;