Skip to content

Commit

Permalink
q5
Browse files Browse the repository at this point in the history
  • Loading branch information
LayneHaber committed Jan 26, 2023
1 parent a6eb3a9 commit ae7bd52
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Expand Up @@ -73,10 +73,4 @@ contract MainnetSpokeConnector is SpokeConnector, IHubConnector {
// otherwise is relayer, update the outbound root on the root manager
IRootManager(ROOT_MANAGER).aggregate(DOMAIN, bytes32(_data));
}

/**
* @dev The `RootManager` calls `.sendMessage` on all connectors, there is nothing on mainnet
* that would be processing "inbound messages", so do nothing in this function
*/
function _processMessage(bytes memory _data) internal override {}
}
Expand Up @@ -3,7 +3,7 @@ pragma solidity 0.8.17;

import {IRootManager} from "../../../../contracts/messaging/interfaces/IRootManager.sol";
import {MainnetSpokeConnector} from "../../../../contracts/messaging/connectors/mainnet/MainnetSpokeConnector.sol";
import {SpokeConnector} from "../../../../contracts/messaging/connectors/SpokeConnector.sol";
import {SpokeConnector, Connector} from "../../../../contracts/messaging/connectors/SpokeConnector.sol";
import {MerkleTreeManager} from "../../../../contracts/messaging/MerkleTreeManager.sol";

import "../../../utils/ConnectorHelper.sol";
Expand Down Expand Up @@ -83,4 +83,12 @@ contract MainnetSpokeConnectorTest is ConnectorHelper {
vm.prank(_rootManager);
MainnetSpokeConnector(_l1Connector).sendMessage(_data, bytes(""));
}

// ============ MainnetSpokeConnector.processMessage ============
function test_MainnetSpokeConnector__processMessage_reverts() public {
vm.expectRevert(Connector.Connector__processMessage_notUsed.selector);

vm.prank(_amb);
MainnetSpokeConnector(_l1Connector).processMessage(bytes(""));
}
}

0 comments on commit ae7bd52

Please sign in to comment.