Skip to content

Commit

Permalink
fix the port and channel for is_receiving_success
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Jun 24, 2024
1 parent 210f34b commit 5c3b3ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/namada/src/ledger/native_vp/masp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,12 @@ where
// Check if IBC message was received successfully in this state transition
fn is_receiving_success(
&self,
src_port_id: &PortId,
src_channel_id: &ChannelId,
dst_port_id: &PortId,
dst_channel_id: &ChannelId,
sequence: Sequence,
) -> Result<bool> {
// Ensure that the event corresponds to the current changes to storage
let ack_key = storage::ack_key(src_port_id, src_channel_id, sequence);
let ack_key = storage::ack_key(dst_port_id, dst_channel_id, sequence);
// If the receive is a success, then the commitment is unique
let succ_ack_commitment = compute_ack_commitment(
&AcknowledgementStatus::success(ack_success_b64()).into(),
Expand Down Expand Up @@ -539,8 +539,8 @@ where
// If the transfer was a failure, then enable funds to
// be withdrawn from the IBC internal address
if self.is_receiving_success(
&msg.packet.port_id_on_a,
&msg.packet.chan_id_on_a,
&msg.packet.port_id_on_b,
&msg.packet.chan_id_on_b,
msg.packet.seq_on_a,
)? {
for ibc_trace in ibc_traces {
Expand Down

0 comments on commit 5c3b3ab

Please sign in to comment.