diff --git a/packages/protocol/test/layer1/preconf/router/RouterTest.t.sol b/packages/protocol/test/layer1/preconf/router/RouterTest.t.sol index ff43469269..bbb676971a 100644 --- a/packages/protocol/test/layer1/preconf/router/RouterTest.t.sol +++ b/packages/protocol/test/layer1/preconf/router/RouterTest.t.sol @@ -94,11 +94,9 @@ contract RouterTest is RouterTestBase { router.proposePreconfedBlocks("", abi.encode(batchParams), ""); } - function test_proposePreconfedBlocks_InvalidProposerParam() external { - address[] memory operators = new address[](3); + function test_proposePreconfedBlocks_proposerNotSender() external { + address[] memory operators = new address[](1); operators[0] = Bob; - operators[1] = Carol; - operators[2] = David; addOperators(operators); // Setup mock beacon for operator selection @@ -124,7 +122,7 @@ contract RouterTest is RouterTestBase { // Create batch params with DIFFERENT proposer than sender ITaikoInbox.BatchParams memory params = ITaikoInbox.BatchParams({ - proposer: Bob, // Set different proposer than sender (Carol) + proposer: Carol, // Set different proposer than sender (Carol) coinbase: address(0), parentMetaHash: bytes32(0), anchorBlockId: 0, @@ -141,13 +139,15 @@ contract RouterTest is RouterTestBase { // Prank as Carol (selected operator) and propose blocks vm.prank(Carol); - vm.expectRevert(IPreconfRouter.InvalidParams.selector); + vm.expectRevert(IPreconfRouter.NotTheOperator.selector); router.proposePreconfedBlocks("", abi.encode(params), ""); } - function test_proposePreconfedBlocks_proposerNotSender() external { - address[] memory operators = new address[](1); + function test_proposePreconfedBlocks_InvalidProposerParam() external { + address[] memory operators = new address[](3); operators[0] = Bob; + operators[1] = Carol; + operators[2] = David; addOperators(operators); // Setup mock beacon for operator selection @@ -173,7 +173,7 @@ contract RouterTest is RouterTestBase { // Create batch params with DIFFERENT proposer than sender ITaikoInbox.BatchParams memory params = ITaikoInbox.BatchParams({ - proposer: Carol, // Set different proposer than sender (Carol) + proposer: Bob, // Set different proposer than sender (Carol) coinbase: address(0), parentMetaHash: bytes32(0), anchorBlockId: 0, @@ -190,7 +190,7 @@ contract RouterTest is RouterTestBase { // Prank as Carol (selected operator) and propose blocks vm.prank(Carol); - vm.expectRevert(IPreconfRouter.NotTheOperator.selector); + vm.expectRevert(IPreconfRouter.InvalidParams.selector); router.proposePreconfedBlocks("", abi.encode(params), ""); } }