Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Nov 13, 2023
1 parent b738766 commit a3096a8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions integration_tests/test_ica_precompile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from enum import IntEnum

import pytest
from eth_utils import keccak
from pystarport import cluster
from web3.datastructures import AttributeDict

Expand Down Expand Up @@ -181,7 +182,13 @@ def check_status():

def wait_for_packet_log(event, channel_id, seq, status):
print("wait for log arrive", seq, status)
expected = AttributeDict({"packetSrcChannel": channel_id, "seq": seq, "status": status})
expected = AttributeDict(
{
"packetSrcChannel": keccak(text=channel_id),
"seq": seq,
"status": status,
}
)

def check_log():
logs = event.getLogs()
Expand Down Expand Up @@ -353,7 +360,7 @@ def submit_msgs_ro(func, str):
contract.events.SubmitMsgsResult,
)
last_seq = tcontract.caller.getLastSeq()
wait_for_status_change(tcontract, last_seq)
wait_for_status_change(tcontract, channel_id2, last_seq)
status = tcontract.caller.getStatus(channel_id2, last_seq)
assert expected_seq == last_seq
assert status == Status.SUCCESS
Expand Down

0 comments on commit a3096a8

Please sign in to comment.