From decf834cfc2e72d21a909a40ac7630e1e80c1a8e Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 10 Dec 2024 11:18:32 -0500 Subject: [PATCH] Update test naming and comments --- contracts/gas-snapshots/ccip.gas-snapshot | 2 +- contracts/src/v0.8/ccip/rmn/RMNRemote.sol | 2 +- ...globalAndLegacyCurses.t.sol => RMNRemote.globalCurses.t.sol} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename contracts/src/v0.8/ccip/test/rmn/RMNRemote/{RMNRemote.globalAndLegacyCurses.t.sol => RMNRemote.globalCurses.t.sol} (92%) diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 7e2ab8222ad..fa768c40bb5 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -576,7 +576,7 @@ RMNRemote_constructor:test_constructor() (gas: 8398) RMNRemote_curse:test_curse_AlreadyCursed_duplicateSubject_reverts() (gas: 154501) RMNRemote_curse:test_curse_calledByNonOwner_reverts() (gas: 18734) RMNRemote_curse:test_curse_success() (gas: 149475) -RMNRemote_global_curses:test_global_curses_success() (gas: 71750) +RMNRemote_global_curses:test_isCursed_globalCurseSubject() (gas: 71715) RMNRemote_isBlessed:test_isBlessed() (gas: 17588) RMNRemote_setConfig:test_setConfig_ZeroValueNotAllowed_revert() (gas: 37971) RMNRemote_setConfig:test_setConfig_addSigner_removeSigner_success() (gas: 993448) diff --git a/contracts/src/v0.8/ccip/rmn/RMNRemote.sol b/contracts/src/v0.8/ccip/rmn/RMNRemote.sol index 087d0184310..83445193ad1 100644 --- a/contracts/src/v0.8/ccip/rmn/RMNRemote.sol +++ b/contracts/src/v0.8/ccip/rmn/RMNRemote.sol @@ -251,7 +251,7 @@ contract RMNRemote is Ownable2StepMsgSender, ITypeAndVersion, IRMNRemote, IRMN { /// @inheritdoc IRMNRemote function isCursed() external view override(IRMN, IRMNRemote) returns (bool) { // There are zero curses under normal circumstances, which means it's cheaper to check for the absence of curses. - // than to check the subject list twice, as we have to check for the global curse subjects. + // than to check the subject list for the global curse subject. if (s_cursedSubjects.length() == 0) { return false; } diff --git a/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalAndLegacyCurses.t.sol b/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalCurses.t.sol similarity index 92% rename from contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalAndLegacyCurses.t.sol rename to contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalCurses.t.sol index e955ac5bfac..6524e2545e5 100644 --- a/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalAndLegacyCurses.t.sol +++ b/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalCurses.t.sol @@ -5,7 +5,7 @@ import {GLOBAL_CURSE_SUBJECT} from "../../../rmn/RMNRemote.sol"; import {RMNRemoteSetup} from "./RMNRemoteSetup.t.sol"; contract RMNRemote_global_curses is RMNRemoteSetup { - function test_global_curses_success() public { + function test_isCursed_globalCurseSubject() public { bytes16 randSubject = bytes16(keccak256("random subject")); assertFalse(s_rmnRemote.isCursed()); assertFalse(s_rmnRemote.isCursed(randSubject));