Skip to content

Commit 537cfa2

Browse files
committed
fix: hash ack value before sending to verify membership for ics8 client
1 parent ec773cf commit 537cfa2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contracts/javascore/ibc/src/main/java/ibc/ics04/channel/IBCPacket.java

+5
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ private void verifyPacketAcknowledgement(
377377
byte[] path,
378378
byte[] acknowledgementCommitmentBytes) {
379379
ILightClient client = getClient(connection.getClientId());
380+
381+
if (IBCCommitment.getHashType(connection.getClientId()) == IBCHost.HashType.ICS08.type) {
382+
acknowledgementCommitmentBytes = IBCCommitment.sha256(acknowledgementCommitmentBytes);
383+
}
384+
380385
client.verifyMembership(
381386
connection.getClientId(),
382387
height,

0 commit comments

Comments
 (0)