optimize justifications before they're included into complex transaction (#1949)

This commit is contained in:
Svyatoslav Nikolsky
2023-03-08 15:12:14 +03:00
committed by Bastian Köcher
parent f4ca16b98d
commit a4a6902bfb
@@ -138,6 +138,9 @@ impl<P: SubstrateFinalitySyncPipeline> OnDemandRelay<P::SourceChain, P::TargetCh
let (header, proof) = finality_source.prove_block_finality(required_header).await?; let (header, proof) = finality_source.prove_block_finality(required_header).await?;
let header_id = header.id(); let header_id = header.id();
// optimize justification before including it into the call
let proof = P::FinalityEngine::optimize_proof(&self.target_client, &header, proof).await?;
log::debug!( log::debug!(
target: "bridge", target: "bridge",
"[{}] Requested to prove {} head {:?}. Selected to prove {} head {:?}", "[{}] Requested to prove {} head {:?}. Selected to prove {} head {:?}",