-
Notifications
You must be signed in to change notification settings - Fork 21.6k
ethclient/gethclient: testcase for createAccessList, make tabledriven #30194
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
ethclient/gethclient: testcase for createAccessList, make tabledriven #30194
Conversation
68c7adb to
2b7d9fc
Compare
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.
I don't get it, you are waiting for a specific error here, right?
Why are you checking for BlobFeeCap too low, which has nothing to do with the basefeecap?
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.
You are right. I just fix this code. (ErrFeeCapTooLow)
One thing is the err at this code, cannot be unwrapped because it was from RPC API response format. So I choose strings.Contains to get the error contains the ErrFeeCapTooLow.
holiman
left a comment
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 method (testAccessList) is already borderline too bloated. Instead of copy-pasting another round of tests, perhaps it can be reformulated into a table-driven test, so that we have a for-loop iterating over the tests, and in the loop body, does the invocation and checks the post-conditions.
ed9e06b to
3262033
Compare
holiman
left a comment
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.
Fixed, LGTM now
…#30194) Adds testcase for createAccessList when user requested gasPrice is less than baseFee, also makes the tests tabledriven --------- Co-authored-by: Martin Holst Swende <martin@swende.se>
…ethereum#30194) Adds testcase for createAccessList when user requested gasPrice is less than baseFee, also makes the tests tabledriven --------- Co-authored-by: Martin Holst Swende <martin@swende.se>
…ethereum#30194) Adds testcase for createAccessList when user requested gasPrice is less than baseFee, also makes the tests tabledriven --------- Co-authored-by: Martin Holst Swende <martin@swende.se>
Add Testcase for createAccessList when user requested gasPrice is less than baseFee
In test, the baseFee for first block is 875000000. So, I just input the gasPrice '1'.
This PR is derived from this issue( #30145 ), so more specific information plz check this issue.