Skip to content

Commit

Permalink
feat: fix merge differences
Browse files Browse the repository at this point in the history
  • Loading branch information
reednaa committed Mar 20, 2024
1 parent 8cdb821 commit 4e69ff5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/IncentivizedMessageEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -927,11 +927,7 @@ abstract contract IncentivizedMessageEscrow is IIncentivizedMessageEscrow, Bytes
bytes32 storedAckHash = _messageDelivered[sourceIdentifier][implementationIdentifier][messageIdentifier];
// First, check if there is actually an appropiate hash at the message identifier.
// Then, check if the storedAckHash & the source target (sourceIdentifier & implementationIdentifier) matches the executed one.
if (storedAckHash == bytes32(0) || storedAckHash != keccak256(bytes.concat(
sourceIdentifier,
implementationIdentifier,
receiveAckWithContext
))) revert CannotRetryWrongMessage(storedAckHash, keccak256(receiveAckWithContext));
if (storedAckHash == bytes32(0) || storedAckHash != keccak256(receiveAckWithContext)) revert CannotRetryWrongMessage(storedAckHash, keccak256(receiveAckWithContext));

// Send the package again.
uint128 cost = _sendPacket(sourceIdentifier, implementationIdentifier, receiveAckWithContext, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ contract MessageIdentifierTest is TestCommon {
// With different destination identifiers they should produce different identifiers.
function test_sender_impacts_message_identifier(address a, address b) public {
vm.assume(a != b);
vm.assume(a != address(application));
vm.assume(b != address(application));
IncentiveDescription storage incentive = _INCENTIVE;

vm.deal(a, _getTotalIncentive(_INCENTIVE));
Expand Down
2 changes: 1 addition & 1 deletion test/TestCommon.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface ICansubmitMessage is IMessageEscrowStructs{
contract TestCommon is Test, IMessageEscrowEvents, IMessageEscrowStructs {

uint256 constant GAS_SPENT_ON_SOURCE = 6617;
uint256 constant GAS_SPENT_ON_DESTINATION = 31513;
uint256 constant GAS_SPENT_ON_DESTINATION = 32102;

bytes32 constant _DESTINATION_IDENTIFIER = bytes32(uint256(0x123123) + uint256(2**255));

Expand Down

0 comments on commit 4e69ff5

Please sign in to comment.