Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: sangier <[email protected]>
  • Loading branch information
AdityaSripal and sangier authored Oct 24, 2024
1 parent e2da2ce commit cf2a76b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/core/v2/ics-004-packet-semantics/PACKET.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ func commitPayload(payload: Payload): bytes {
}

func commitV2Packet(packet: Packet) {
timeoutBytes = LittleEndian(timeout)
timeoutBytes = LittleEndian(packet.timeout)
var appBytes: bytes
for p in packet.payload {
appBytes = append(appBytes, commitPayload(p))
}
buffer = sha256.Hash(destIdentifier)
buffer = append(buffer, sha256.hash(bigEndian(timeoutBytes)))
buffer = append(buffer, sha256.hash(data))
buffer = sha256.Hash(packet.destChannel)
buffer = append(buffer, sha256.hash(timeoutBytes))
buffer = append(buffer, sha256.hash(appBytes))
return sha256.Hash(buffer)
}
```
Expand Down

0 comments on commit cf2a76b

Please sign in to comment.