Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
soloseng committed Nov 15, 2024
1 parent 36fe39b commit 88fb9ae
Showing 1 changed file with 13 additions and 27 deletions.
40 changes: 13 additions & 27 deletions packages/protocol/test-sol/unit/governance/network/Governance.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3516,7 +3516,7 @@ contract GovernanceTest_prepareHotfix_L2 is GovernanceTest {
}
}

contract GovernanceTest_resetHotfix is GovernanceTest {
contract GovernanceTest_resetHotfix_setup is GovernanceTest {
bytes32 constant HOTFIX_HASH = bytes32(uint256(0x123456789));
bytes32 constant SALT = 0x657ed9d64e84fa3d1af43b3a307db22aba2d90a158015df1c588c02e24ca08f0;
bytes32 hotfixHash;
Expand All @@ -3525,12 +3525,6 @@ contract GovernanceTest_resetHotfix is GovernanceTest {

function setUp() public {
super.setUp();

validator1 = actor("validator1");
governance.addValidator(validator1);
vm.prank(validator1);
accounts.createAccount();

vm.prank(accOwner);
governance.setSecurityCouncil(accCouncil);

Expand All @@ -3542,6 +3536,17 @@ contract GovernanceTest_resetHotfix is GovernanceTest {
SALT
);
}
}

contract GovernanceTest_resetHotfix is GovernanceTest_resetHotfix_setup {
function setUp() public {
super.setUp();

validator1 = actor("validator1");
governance.addValidator(validator1);
vm.prank(validator1);
accounts.createAccount();
}

function test_Reverts_whenCalledOnL1() public {
vm.prank(accOwner);
Expand Down Expand Up @@ -3569,26 +3574,7 @@ contract GovernanceTest_resetHotfix is GovernanceTest {
}
}

contract GovernanceTest_resetHotfix_L2 is GovernanceTest {
bytes32 constant HOTFIX_HASH = bytes32(uint256(0x123456789));
bytes32 constant SALT = 0x657ed9d64e84fa3d1af43b3a307db22aba2d90a158015df1c588c02e24ca08f0;
bytes32 hotfixHash;
event HotfixRecordReset(bytes32 indexed hash);

function setUp() public {
super.setUp();
_whenL2();
vm.prank(accOwner);
governance.setSecurityCouncil(accCouncil);

hotfixHash = governance.getHotfixHash(
okProp.values,
okProp.destinations,
okProp.data,
okProp.dataLengths,
SALT
);
}
contract GovernanceTest_resetHotfix_L2 is GovernanceTest_L2, GovernanceTest_resetHotfix_setup {
function test_ShouldResetHotfixRecordWhenExecutionTimeLimitHasPassed() public {
vm.prank(accOwner);
governance.setHotfixExecutionTimeWindow(DAY);
Expand Down

0 comments on commit 88fb9ae

Please sign in to comment.