Skip to content

Commit

Permalink
add timeoutTimestamp in forwarding (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
sangier authored Nov 7, 2024
1 parent c34c51e commit ccc522a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/app/ics-020-fungible-token-transfer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ interface Denom {

interface Forwarding {
hops: []Hop
timeoutTimestamp: uint64
memo: string
}

Expand Down Expand Up @@ -426,8 +427,10 @@ function onRecvPacket(
if len(data.forwarding.hops) > 0 {

memo = ""
originalTimeoutTimestamp = data.forwarding.timeoutTimestamp
nextForwarding = Forwarding{
hops: data.forwarding.hops[1:]
timeoutTimestamp: originalTimeoutTimestamp // pass the original timestamp value
memo: data.forwarding.memo
}
if len(data.forwarding.hops) == 1 {
Expand Down Expand Up @@ -456,7 +459,7 @@ function onRecvPacket(

packetSequence=handler.sendPacket(
forwarding.hops[0].channelId,
currentTime() + DefaultHopTimeoutPeriod,
originalTimeoutTimestamp,
forwardingPayload
)
// store previous packet sequence and destChannelId for future sending ack
Expand Down

0 comments on commit ccc522a

Please sign in to comment.