Skip to content

Commit

Permalink
Correctly verify sequence in ETH tests
Browse files Browse the repository at this point in the history
Change-Id: Ic9a9fa5355362326a47d9d3742107ccaac6794d5
  • Loading branch information
hendrikhofstadt committed Jun 30, 2021
1 parent 6d1b3d2 commit e7ebf8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ethereum/test/wormhole.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ contract("Wormhole", function () {
nonce,
emitterChainId,
emitterAddress,
0,
1337,
data,
[
testSigner1PK,
Expand All @@ -174,6 +174,7 @@ contract("Wormhole", function () {
assert.equal(result.vm.emitterAddress, emitterAddress);
assert.equal(result.vm.payload, data);
assert.equal(result.vm.guardianSetIndex, 0);
assert.equal(result.vm.sequence, 1337);

assert.equal(result.valid, true);

Expand Down Expand Up @@ -639,7 +640,7 @@ const signAndEncodeVM = async function(
web3.eth.abi.encodeParameter("uint32", nonce).substring(2 + (64 - 8)),
web3.eth.abi.encodeParameter("uint16", emitterChainId).substring(2 + (64 - 4)),
web3.eth.abi.encodeParameter("bytes32", emitterAddress).substring(2),
web3.eth.abi.encodeParameter("uint64", timestamp).substring(2 + (64 - 16)),
web3.eth.abi.encodeParameter("uint64", sequence).substring(2 + (64 - 16)),
data.substr(2)
]

Expand Down

0 comments on commit e7ebf8d

Please sign in to comment.