Commit faa6c5ed authored by Maurelian's avatar Maurelian Committed by GitHub

test(ctb): unskip testCannot_AppendWithUnmatchedBlockhash (#2899)

parent 3b0afde6
...@@ -57,14 +57,15 @@ L2CrossDomainMessenger_Test:test_L2MessengerSendMessage() (gas: 119682) ...@@ -57,14 +57,15 @@ L2CrossDomainMessenger_Test:test_L2MessengerSendMessage() (gas: 119682)
L2CrossDomainMessenger_Test:test_L2MessengerTwiceSendMessage() (gas: 133142) L2CrossDomainMessenger_Test:test_L2MessengerTwiceSendMessage() (gas: 133142)
L2CrossDomainMessenger_Test:test_L2MessengerXDomainSenderReverts() (gas: 10599) L2CrossDomainMessenger_Test:test_L2MessengerXDomainSenderReverts() (gas: 10599)
L2CrossDomainMessenger_Test:test_L2MessengerxDomainMessageSenderResets() (gas: 54881) L2CrossDomainMessenger_Test:test_L2MessengerxDomainMessageSenderResets() (gas: 54881)
L2OutputOracleTest:testCannot_AppendWithUnmatchedBlockhash() (gas: 26799)
L2OutputOracleTest:testCannot_appendEmptyOutput() (gas: 24119) L2OutputOracleTest:testCannot_appendEmptyOutput() (gas: 24119)
L2OutputOracleTest:testCannot_appendFutureTimetamp() (gas: 26086) L2OutputOracleTest:testCannot_appendFutureTimetamp() (gas: 26043)
L2OutputOracleTest:testCannot_appendOnWrongFork() (gas: 26371) L2OutputOracleTest:testCannot_appendOnWrongFork() (gas: 26348)
L2OutputOracleTest:testCannot_appendOutputIfNotSequencer() (gas: 23510) L2OutputOracleTest:testCannot_appendOutputIfNotSequencer() (gas: 23510)
L2OutputOracleTest:testCannot_appendUnexpectedBlockNumber() (gas: 25995) L2OutputOracleTest:testCannot_appendUnexpectedBlockNumber() (gas: 25951)
L2OutputOracleTest:testCannot_deleteL2Output_ifNotOwner() (gas: 24777) L2OutputOracleTest:testCannot_deleteL2Output_ifNotOwner() (gas: 24799)
L2OutputOracleTest:testCannot_deleteL2Output_withWrongRoot() (gas: 91091) L2OutputOracleTest:testCannot_deleteL2Output_withWrongRoot() (gas: 91091)
L2OutputOracleTest:testCannot_deleteL2Output_withWrongTime() (gas: 87084) L2OutputOracleTest:testCannot_deleteL2Output_withWrongTime() (gas: 87040)
L2OutputOracleTest:test_appendWithBlockhashAndHeight() (gas: 75017) L2OutputOracleTest:test_appendWithBlockhashAndHeight() (gas: 75017)
L2OutputOracleTest:test_appendingAnotherOutput() (gas: 76817) L2OutputOracleTest:test_appendingAnotherOutput() (gas: 76817)
L2OutputOracleTest:test_changeSequencer() (gas: 55776) L2OutputOracleTest:test_changeSequencer() (gas: 55776)
...@@ -74,7 +75,7 @@ L2OutputOracleTest:test_deleteL2Output() (gas: 76516) ...@@ -74,7 +75,7 @@ L2OutputOracleTest:test_deleteL2Output() (gas: 76516)
L2OutputOracleTest:test_getL2Output() (gas: 82924) L2OutputOracleTest:test_getL2Output() (gas: 82924)
L2OutputOracleTest:test_latestBlockNumber() (gas: 76220) L2OutputOracleTest:test_latestBlockNumber() (gas: 76220)
L2OutputOracleTest:test_nextBlockNumber() (gas: 15144) L2OutputOracleTest:test_nextBlockNumber() (gas: 15144)
L2OutputOracleTest:test_updateOwner() (gas: 34580) L2OutputOracleTest:test_updateOwner() (gas: 34602)
L2OutputOracleUpgradeable_Test:test_cannotInitImpl() (gas: 8476) L2OutputOracleUpgradeable_Test:test_cannotInitImpl() (gas: 8476)
L2OutputOracleUpgradeable_Test:test_cannotInitProxy() (gas: 13453) L2OutputOracleUpgradeable_Test:test_cannotInitProxy() (gas: 13453)
L2OutputOracleUpgradeable_Test:test_initValuesOnProxy() (gas: 38906) L2OutputOracleUpgradeable_Test:test_initValuesOnProxy() (gas: 38906)
......
...@@ -233,9 +233,7 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer { ...@@ -233,9 +233,7 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
// Test: appendL2Output fails when given valid input, but the block hash and number do not // Test: appendL2Output fails when given valid input, but the block hash and number do not
// match. // match.
// This tests is disabled (w/ skip_ prefix) because all blocks in Foundry currently have a function testCannot_AppendWithUnmatchedBlockhash() external {
// blockhash of zero.
function skip_testCannot_AppendWithUnmatchedBlockhash() external {
// Move ahead to block 100 so that we can reference historical blocks // Move ahead to block 100 so that we can reference historical blocks
vm.roll(100); vm.roll(100);
...@@ -248,6 +246,7 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer { ...@@ -248,6 +246,7 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
vm.prank(sequencer); vm.prank(sequencer);
// This will fail when foundry no longer returns zerod block hashes // This will fail when foundry no longer returns zerod block hashes
vm.expectRevert("OutputOracle: Blockhash does not match the hash at the expected height.");
oracle.appendL2Output(nonZeroHash, nextBlockNumber, l1BlockHash, l1BlockNumber - 1); oracle.appendL2Output(nonZeroHash, nextBlockNumber, l1BlockHash, l1BlockNumber - 1);
} }
......
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