Commit 79ca7e1a authored by Maurelian's avatar Maurelian Committed by GitHub

style(ctb): Rename _isSystemMessageSender to _isOtherMessenger (#3022)

parent 921653f8
...@@ -46,7 +46,7 @@ contract L1CrossDomainMessenger is CrossDomainMessenger, Semver { ...@@ -46,7 +46,7 @@ contract L1CrossDomainMessenger is CrossDomainMessenger, Semver {
* *
* @return True if the message was sent from the messenger, false otherwise. * @return True if the message was sent from the messenger, false otherwise.
*/ */
function _isSystemMessageSender() internal view override returns (bool) { function _isOtherMessenger() internal view override returns (bool) {
return msg.sender == address(portal) && portal.l2Sender() == otherMessenger; return msg.sender == address(portal) && portal.l2Sender() == otherMessenger;
} }
......
...@@ -52,7 +52,7 @@ contract L2CrossDomainMessenger is CrossDomainMessenger, Semver { ...@@ -52,7 +52,7 @@ contract L2CrossDomainMessenger is CrossDomainMessenger, Semver {
* *
* @return True if the message sender is the L1CrossDomainMessenger on L1. * @return True if the message sender is the L1CrossDomainMessenger on L1.
*/ */
function _isSystemMessageSender() internal view override returns (bool) { function _isOtherMessenger() internal view override returns (bool) {
return AddressAliasHelper.undoL1ToL2Alias(msg.sender) == otherMessenger; return AddressAliasHelper.undoL1ToL2Alias(msg.sender) == otherMessenger;
} }
......
...@@ -274,7 +274,7 @@ abstract contract CrossDomainMessenger is ...@@ -274,7 +274,7 @@ abstract contract CrossDomainMessenger is
_message _message
); );
if (_isSystemMessageSender()) { if (_isOtherMessenger()) {
// Should never happen. // Should never happen.
require(msg.value == _value, "Mismatched message value."); require(msg.value == _value, "Mismatched message value.");
} else { } else {
...@@ -349,7 +349,7 @@ abstract contract CrossDomainMessenger is ...@@ -349,7 +349,7 @@ abstract contract CrossDomainMessenger is
* contracts because the logic for this depends on the network where the messenger is * contracts because the logic for this depends on the network where the messenger is
* being deployed. * being deployed.
*/ */
function _isSystemMessageSender() internal view virtual returns (bool); function _isOtherMessenger() internal view virtual returns (bool);
/** /**
* @notice Sends a low-level message to the other messenger. Needs to be implemented by child * @notice Sends a low-level message to the other messenger. Needs to be implemented by child
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment