From ef4ba247c83836ff5d193e6b77fe87b60bcc23fc Mon Sep 17 00:00:00 2001 From: Erwan Or Date: Thu, 12 Dec 2024 14:00:58 -0500 Subject: [PATCH] chain(penumbra): propagate NEX proofs for packet receipt (#50) --- crates/relayer/src/chain/penumbra/chain.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/crates/relayer/src/chain/penumbra/chain.rs b/crates/relayer/src/chain/penumbra/chain.rs index e14c48de3b..bfcde31500 100644 --- a/crates/relayer/src/chain/penumbra/chain.rs +++ b/crates/relayer/src/chain/penumbra/chain.rs @@ -1370,17 +1370,9 @@ impl ChainEndpoint for PenumbraChain { .into_inner(); let raw_proof_bytes = response.proof; - if !response.received { - // TODO(erwan): not completely clear this should be an error, but this match - // the behavior based on the current implementation where the tonic 404 is treated as an error. - return Err(Error::other_with_string(format!( - "packet receipt not found for port_id: {}, channel_id: {}, sequence: {}", - port_id, channel_id, sequence - ))); - } match include_proof { - IncludeProof::No => Ok((vec![], None)), + IncludeProof::No => Ok((vec![response.received.into()], None)), IncludeProof::Yes => { if raw_proof_bytes.is_empty() { return Err(Error::empty_response_proof()); @@ -1393,7 +1385,7 @@ impl ChainEndpoint for PenumbraChain { .try_into() .map_err(|e| Error::other(Box::new(e)))?; - Ok((vec![], Some(proof))) + Ok((vec![response.received.into()], Some(proof))) } } }