From cf2a76b38b1d7b883c4cc626e4e8c8c16cafb08a Mon Sep 17 00:00:00 2001 From: Aditya <14364734+AdityaSripal@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:27:49 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: sangier <45793271+sangier@users.noreply.github.com> --- spec/core/v2/ics-004-packet-semantics/PACKET.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/core/v2/ics-004-packet-semantics/PACKET.md b/spec/core/v2/ics-004-packet-semantics/PACKET.md index 0397680ca..44d256847 100644 --- a/spec/core/v2/ics-004-packet-semantics/PACKET.md +++ b/spec/core/v2/ics-004-packet-semantics/PACKET.md @@ -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) } ```