From 2497f871913b370f9da169bcc6bd1bcfae17430e Mon Sep 17 00:00:00 2001 From: Anca Zamfir Date: Mon, 26 Apr 2021 20:48:30 +0200 Subject: [PATCH] Check for empty Tx response when querying packet events (#852) * Check for empty Tx response when querying packets * Update changelog * Fix typos --- CHANGELOG.md | 2 ++ relayer/src/chain/cosmos.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aee0e807b4..3df6b1c96f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - [ibc-relayer] - Fix pagination in gRPC query for clients ([#811]) + - Fix relayer crash when hermes starts in the same time as packets are being sent ([#851]) ### BREAKING CHANGES @@ -19,6 +20,7 @@ [#785]: https://github.com/informalsystems/ibc-rs/issues/785 [#811]: https://github.com/informalsystems/ibc-rs/issues/811 +[#851]: https://github.com/informalsystems/ibc-rs/issues/851 ## v0.2.0 diff --git a/relayer/src/chain/cosmos.rs b/relayer/src/chain/cosmos.rs index dfb157107d..69a90a75cb 100644 --- a/relayer/src/chain/cosmos.rs +++ b/relayer/src/chain/cosmos.rs @@ -992,6 +992,10 @@ impl Chain for CosmosSdkChain { "packet_from_tx_search_response: unexpected number of txs" ); + if response.txs.is_empty() { + continue; + } + if let Some(event) = packet_from_tx_search_response( self.id(), &request,