-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds more tests related to precompiles #2709
base: master
Are you sure you want to change the base?
Conversation
It only calls util.RemapL1Address, that is covered in other test flows
It basically uses AddressSet.RectifyMapping that is already covered in other tests
"github.com/offchainlabs/nitro/util/testhelpers" | ||
) | ||
|
||
func TestArbGasInfo(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like it's actually checking several different calls in the same test. But, I can't tell if the results of the later calls actually depend on the results of the earlier calls. In many cases, it looks like they are unrelated. If so, they should be in separate test functions to make it clearer which part of the test is failing, and to make the setup for the test clearly connect to the assertions in the test.
@@ -125,6 +142,184 @@ func TestPrecompileErrorGasLeft(t *testing.T) { | |||
assertNotAllGasConsumed(common.HexToAddress("0xff"), arbDebug.Methods["legacyError"].ID) | |||
} | |||
|
|||
func TestArbGasInfoAndArbOwner(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same feedback about doing too much in the same test function.
Resolves NIT-2772.
Improve precompiles' test coverage.
Other precompiles methods from ArbOwner, ArbWasm, and ArbWasmCache, are tested in a PR from @ganeshvanahalli.