From e7ebf8dc1d057d462a5ca41cc78c69c42ec44cc1 Mon Sep 17 00:00:00 2001 From: Hendrik Hofstadt Date: Wed, 30 Jun 2021 13:13:31 +0200 Subject: [PATCH] Correctly verify sequence in ETH tests Change-Id: Ic9a9fa5355362326a47d9d3742107ccaac6794d5 --- ethereum/test/wormhole.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ethereum/test/wormhole.js b/ethereum/test/wormhole.js index 69c1e4508..61438a10e 100644 --- a/ethereum/test/wormhole.js +++ b/ethereum/test/wormhole.js @@ -150,7 +150,7 @@ contract("Wormhole", function () { nonce, emitterChainId, emitterAddress, - 0, + 1337, data, [ testSigner1PK, @@ -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); @@ -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) ]