-
Notifications
You must be signed in to change notification settings - Fork 209
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
PRT-88: Prevent potential panic in the tendermintRPC #139
Conversation
Nice catch! |
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.
Very good PR title and descirption in the body, thanks!
Can you add the Jira ticket please?
Thanks, I opened it (PRT-88)! Next time I will use branch_naming from Jira (i can not change it now ) |
3610625
to
0fdb6b8
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.
last change :)
) | ||
|
||
var ( | ||
errFailedToConvertMessage = sdkerrors.New("RPC error", 1000, "failed to convert a message") |
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.
usually errors would be with a capital letter so they will be available for other packages as well
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.
No worries, we need to make our code as code as possible :D
I usually make them exportable only if they are used outside, but cool will follow structure we have 9d86272
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 the build error 9b3d0d6
Description
Inside tendermintRPC.go we have potential panic. If these methods:
returns an error, rpcMessage object will be nil, which means that convertMsg method would not be able to extract fields and it will panic
Changes include