Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix packet delivery in mock test suite by adjusting TX expiry. #5

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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