Skip to content

Commit 434c5e0

Browse files
authored
optimize justifications before they're included into complex transaction (#1949)
1 parent 7bac365 commit 434c5e0

File tree

1 file changed

+3
-0
lines changed
  • relays/lib-substrate-relay/src/on_demand

1 file changed

+3
-0
lines changed

relays/lib-substrate-relay/src/on_demand/headers.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ impl<P: SubstrateFinalitySyncPipeline> OnDemandRelay<P::SourceChain, P::TargetCh
138138
let (header, proof) = finality_source.prove_block_finality(required_header).await?;
139139
let header_id = header.id();
140140

141+
// optimize justification before including it into the call
142+
let proof = P::FinalityEngine::optimize_proof(&self.target_client, &header, proof).await?;
143+
141144
log::debug!(
142145
target: "bridge",
143146
"[{}] Requested to prove {} head {:?}. Selected to prove {} head {:?}",

0 commit comments

Comments
 (0)