Skip to content

Commit

Permalink
chain(penumbra): propagate NEX proofs for packet receipt (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor authored Dec 12, 2024
1 parent 12ce5ed commit ef4ba24
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions crates/relayer/src/chain/penumbra/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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)))
}
}
}
Expand Down

0 comments on commit ef4ba24

Please sign in to comment.