Skip to content

Commit

Permalink
Bit more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Aug 10, 2022
1 parent db00740 commit 267a30c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions relayer/src/foreign_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,8 @@ impl<DstChain: ChainHandle, SrcChain: ChainHandle> ForeignClient<DstChain, SrcCh
(None, _) | (_, None) => Ok(None),
(Some(elapsed), Some(refresh_window)) => {
if elapsed > refresh_window {
info!("[{}] client requires refresh", self);
info!(?elapsed, ?refresh_window, "client needs to be refreshed");

self.build_latest_update_client_and_send()
.map_or_else(Err, |ev| Ok(Some(ev)))
} else {
Expand Down Expand Up @@ -1071,12 +1072,11 @@ impl<DstChain: ChainHandle, SrcChain: ChainHandle> ForeignClient<DstChain, SrcCh
} = self.check_consensus_state_trusting_period(&client_state, &trusted_height)?
{
error!(
trusted_height = %trusted_height,
network_timestmap = %network_timestamp,
consensus_state_timestamp = %consensus_state_timestmap,
elapsed = ?elapsed,
"[{}] cannot build client update message because the provided trusted height is outside of trusting period!",
self
%trusted_height,
%network_timestamp,
%consensus_state_timestmap,
?elapsed,
"cannot build client update message because the provided trusted height is outside of trusting period!",
);
return Err(ForeignClientError::consensus_state_not_trusted(
trusted_height,
Expand Down

0 comments on commit 267a30c

Please sign in to comment.