Skip to content

Commit

Permalink
fix consensus_state ibc grpc impl
Browse files Browse the repository at this point in the history
  • Loading branch information
noot authored and avahowell committed Jan 5, 2024
1 parent 239096f commit 05c47a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/core/component/ibc/src/component/rpc/client_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,14 @@ impl ClientQuery for IbcQuery {
let snapshot = self.0.latest_snapshot();
let client_id = ClientId::from_str(&request.get_ref().client_id)
.map_err(|e| tonic::Status::invalid_argument(format!("invalid client id: {e}")))?;
let height = get_latest_verified_height(&snapshot, &client_id).await?;
let height = if request.get_ref().latest_height {
get_latest_verified_height(&snapshot, &client_id).await?
} else {
Height {
revision_number: request.get_ref().revision_number,
revision_height: request.get_ref().revision_height,
}
};

let (cs_opt, proof) = snapshot
.get_with_proof(
Expand Down

0 comments on commit 05c47a2

Please sign in to comment.