Skip to content

Commit

Permalink
Merge pull request #5 from Zodomo/main
Browse files Browse the repository at this point in the history
Fix packet delivery in mock test suite by adjusting TX expiry.
  • Loading branch information
carmenjiawenc authored Dec 22, 2023
2 parents 22b76ed + 44ac15b commit c321320
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions oapp/test/TestHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,13 @@ contract TestHelper is Test, OptionsHelper {
100
);
{
bytes32 hash = dvn.hashCallData(dstEid, address(dstUln), verifyCalldata, 1000);
bytes32 hash = dvn.hashCallData(dstEid, address(dstUln), verifyCalldata, block.timestamp + 1000);
bytes32 ethSignedMessageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
(uint8 v, bytes32 r, bytes32 s) = vm.sign(1, ethSignedMessageHash); // matches dvn signer
signatures = abi.encodePacked(r, s, v);
}
ExecuteParam[] memory params = new ExecuteParam[](1);
params[0] = ExecuteParam(dstEid, address(dstUln), verifyCalldata, 1000, signatures);
params[0] = ExecuteParam(dstEid, address(dstUln), verifyCalldata, block.timestamp + 1000, signatures);
dvn.execute(params);

// commit verification
Expand All @@ -410,12 +410,12 @@ contract TestHelper is Test, OptionsHelper {
payloadHash
);
{
bytes32 hash = dvn.hashCallData(dstEid, address(dstUln), callData, 1000);
bytes32 hash = dvn.hashCallData(dstEid, address(dstUln), callData, block.timestamp + 1000);
bytes32 ethSignedMessageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
(uint8 v, bytes32 r, bytes32 s) = vm.sign(1, ethSignedMessageHash); // matches dvn signer
signatures = abi.encodePacked(r, s, v);
}
params[0] = ExecuteParam(dstEid, address(dstUln), callData, 1000, signatures);
params[0] = ExecuteParam(dstEid, address(dstUln), callData, block.timestamp + 1000, signatures);
dvn.execute(params);
} else {
SimpleMessageLibMock(payable(receiveLib)).validatePacket(_packetBytes);
Expand Down

0 comments on commit c321320

Please sign in to comment.