Skip to content

Commit

Permalink
add height to packet_commitment req
Browse files Browse the repository at this point in the history
  • Loading branch information
noot committed Sep 16, 2024
1 parent 903bac5 commit 450f848
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion crates/relayer/src/chain/astria/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1115,9 +1115,19 @@ impl ChainEndpoint for AstriaEndpoint {
port_id: request.port_id.to_string(),
channel_id: request.channel_id.to_string(),
sequence: request.sequence.into(),
// TODO: height is ignored
};

let request = tonic::Request::new(req);
let height = match request.height {
QueryHeight::Latest => 0.to_string(),
QueryHeight::Specific(h) => h.to_string(),
};

let mut request = tonic::Request::new(req);
request
.metadata_mut()
.insert("height", height.parse().expect("valid ascii"));

let response = self
.block_on(client.packet_commitment(request))
.map_err(|e| Error::grpc_status(e, "query_packet_commitment".to_owned()))?
Expand Down

0 comments on commit 450f848

Please sign in to comment.