diff --git a/cumulus/consensus/src/lib.rs b/cumulus/consensus/src/lib.rs index 1b1c567fea..05c91a26d1 100644 --- a/cumulus/consensus/src/lib.rs +++ b/cumulus/consensus/src/lib.rs @@ -131,12 +131,17 @@ where type Block = Block; fn finalize(&self, hash: ::Hash) -> ClientResult { - match self.finalize_block(BlockId::hash(hash), None, true) { - Ok(()) => Ok(true), - Err(e) => match e { - ClientError::UnknownBlock(_) => Ok(false), - _ => Err(e), - }, + // don't finalize the same block multiple times. + if self.chain_info().finalized_hash != hash { + match self.finalize_block(BlockId::hash(hash), None, true) { + Ok(()) => Ok(true), + Err(e) => match e { + ClientError::UnknownBlock(_) => Ok(false), + _ => Err(e), + }, + } + } else { + Ok(true) } } }