From b22766dab34db6fec2ee656906cff216ba5e5ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= <123550+andresilva@users.noreply.github.com> Date: Fri, 11 Jun 2021 12:18:41 +0100 Subject: [PATCH] grandpa: ignore justifications from other consensus engines (#9075) --- substrate/client/finality-grandpa/src/import.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/substrate/client/finality-grandpa/src/import.rs b/substrate/client/finality-grandpa/src/import.rs index 474f6ee5bf..3d22cc8866 100644 --- a/substrate/client/finality-grandpa/src/import.rs +++ b/substrate/client/finality-grandpa/src/import.rs @@ -646,10 +646,12 @@ where initial_sync: bool, ) -> Result<(), ConsensusError> { if justification.0 != GRANDPA_ENGINE_ID { - return Err(ConsensusError::ClientImport(format!( - "Expected GRANDPA Justification, got {}.", - String::from_utf8_lossy(&justification.0) - ))); + // TODO: the import queue needs to be refactored to be able dispatch to the correct + // `JustificationImport` instance based on `ConsensusEngineId`, or we need to build a + // justification import pipeline similar to what we do for `BlockImport`. In the + // meantime we'll just drop the justification, since this is only used for BEEFY which + // is still WIP. + return Ok(()); } let justification = GrandpaJustification::decode_and_verify_finalizes(