From f74c5265688a4447ca9816f5a846ca5f2837897b Mon Sep 17 00:00:00 2001 From: Vladislav Markushin Date: Mon, 19 Jun 2023 17:22:57 -0300 Subject: [PATCH] Find forced authorities change in hyperspace --- hyperspace/parachain/src/finality_protocol.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hyperspace/parachain/src/finality_protocol.rs b/hyperspace/parachain/src/finality_protocol.rs index d9d9a68b2..7fe9b73ea 100644 --- a/hyperspace/parachain/src/finality_protocol.rs +++ b/hyperspace/parachain/src/finality_protocol.rs @@ -53,6 +53,7 @@ use std::{ }; use beefy_prover::helpers::unsafe_arc_cast; +use grandpa_light_client_primitives::justification::find_forced_change; use grandpa_prover::{GrandpaJustification, JustificationNotification}; use ibc::core::{ ics04_channel::packet::Packet, @@ -636,7 +637,8 @@ where let target = sp_runtime::generic::Header::::decode(&mut &*target) .expect("Should not panic, same struct from different crates"); - let authority_set_changed_scheduled = find_scheduled_change(&target).is_some(); + let authority_set_changed_scheduled = + find_scheduled_change(&target).is_some() || find_forced_change(&target).is_some(); // if validator set has changed this is a mandatory update let update_type = match authority_set_changed_scheduled || timeout_update_required || is_update_required {