Skip to content

Commit

Permalink
additional log in finality relay + rephrase "failed" (paritytech#1182)
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik authored and serban300 committed Apr 9, 2024
1 parent 07ac278 commit 1dbb8e7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bridges/relays/finality/src/finality_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,14 @@ pub(crate) async fn read_missing_headers<
header_number = header_number + One::one();
}

log::trace!(
target: "bridge",
"Read {} {} headers. Selected finality proof for header: {:?}",
best_number_at_source.saturating_sub(best_number_at_target),
P::SOURCE_NAME,
selected_finality_proof.as_ref().map(|(header, _)| header),
);

Ok(match selected_finality_proof {
Some((header, proof)) => SelectedFinalityProof::Regular(unjustified_headers, header, proof),
None => SelectedFinalityProof::None(unjustified_headers),
Expand Down Expand Up @@ -584,7 +592,7 @@ pub(crate) fn select_better_recent_finality_proof<P: FinalitySyncPipeline>(
buffered_range_begin,
buffered_range_end,
selected_header_number,
if has_selected_finality_proof { "improved" } else { "failed" },
if has_selected_finality_proof { "improved" } else { "not improved" },
);
if !has_selected_finality_proof {
return selected_finality_proof
Expand Down

0 comments on commit 1dbb8e7

Please sign in to comment.