-
Notifications
You must be signed in to change notification settings - Fork 330
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
[api]fix JsonRPC api response id type doesn't match request type #4168
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4168 +/- ##
==========================================
- Coverage 76.51% 76.20% -0.31%
==========================================
Files 340 340
Lines 29273 29108 -165
==========================================
- Hits 22397 22182 -215
- Misses 5761 5826 +65
+ Partials 1115 1100 -15 ☔ View full report in Codecov by Sentry. |
what type of id is used in geth? |
json.RawMessage, It also gets the id from the request, checks if the id is valid (not an object or array), and returns it as it is |
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.
need to add tests
Quality Gate failedFailed conditions |
Could |
Quality Gate passedIssues Measures |
Description
The id field's type should be match the request type.
if request id is
string
, the response id should bestring
, if request id isnumber
, the response id should benumber
too.Fixes #4154
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: