-
Notifications
You must be signed in to change notification settings - Fork 398
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
chore: fix rpc consensus_state height_vote_set #2696
Conversation
8176ccb
to
c5653e1
Compare
c5653e1
to
1e1efc9
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2696 +/- ##
==========================================
- Coverage 60.15% 60.15% -0.01%
==========================================
Files 561 561
Lines 74999 74999
==========================================
- Hits 45119 45112 -7
- Misses 26505 26509 +4
- Partials 3375 3378 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -194,7 +194,7 @@ func NewRPCSuccessResponse(id JSONRPCID, res any) RPCResponse { | |||
|
|||
if res != nil { | |||
var js []byte | |||
js, err := amino.MarshalJSON(res) | |||
js, err := json.Marshal(res) |
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.
Can we figure out why the Amino JSON is causing an empty object? What is the type of res?
Maybe we just need to register the package / type with Amino
It's now causing tests to fail, most likely because we use Amino JSON to unmarshal all responses / requests
This has to be fixed by implementing I'm closing this PR and opening up an issue. I'd do this myself, but I'd want to make sure this is done for all current implementations of See #2882. |
It seems there is an error on amino parsing
RoundStateSimple.Votes
Before
After
After the fix, i realized that tendermint1 latest version is using json too on this field
https://github.com/tendermint/tendermint/blob/35581cf54ec436b8c37fabb43fdaa3f48339a170/rpc/jsonrpc/types/types.go#L187-L200