Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions crates/relayer/src/chain/cosmos/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,6 @@ pub struct QueryResponse {

pub fn packet_query(request: &QueryPacketEventDataRequest, seq: Sequence) -> Query {
Query::eq(
format!("{}.packet_src_channel", request.event_id.as_str()),
request.source_channel_id.to_string(),
)
.and_eq(
format!("{}.packet_src_port", request.event_id.as_str()),
request.source_port_id.to_string(),
)
.and_eq(
format!("{}.packet_dst_channel", request.event_id.as_str()),
request.destination_channel_id.to_string(),
)
.and_eq(
format!("{}.packet_dst_port", request.event_id.as_str()),
request.destination_port_id.to_string(),
)
.and_eq(
format!("{}.packet_sequence", request.event_id.as_str()),
seq.to_string(),
)
Expand Down
10 changes: 8 additions & 2 deletions crates/relayer/src/chain/cosmos/query/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,15 @@ pub async fn query_packets_from_txs(
let mut result: Vec<IbcEventWithHeight> = vec![];

for seq in &request.sequences {
// Query the latest 10 txs which include the event specified in the query request
// Query the latest 100 txs which include the event specified in the query request
let response = rpc_client
.tx_search(packet_query(request, *seq), false, 1, 10, Order::Descending)
.tx_search(
packet_query(request, *seq),
false,
1,
100,
Order::Descending,
)
.await
.map_err(|e| Error::rpc(rpc_address.clone(), e))?;

Expand Down