-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: check for nil params #18041
chore: check for nil params #18041
Conversation
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.
LGTM.
@@ -175,6 +175,17 @@ func (s *KeeperTestSuite) TestUpdateParams() { | |||
expErr: true, | |||
expErrMsg: "invalid authority", | |||
}, | |||
{ |
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.
should also add the unit tests if any of block, validator is missing.
x/consensus/types/msgs.go
Outdated
return cmtproto.ConsensusParams{}, errors.New("all parameters must be present") | ||
} | ||
|
||
fmt.Println(msg.Evidence) |
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.
fmt.Println(msg.Evidence) |
@@ -9,7 +12,13 @@ import ( | |||
|
|||
var _ sdk.Msg = &MsgUpdateParams{} | |||
|
|||
func (msg MsgUpdateParams) ToProtoConsensusParams() cmtproto.ConsensusParams { | |||
func (msg MsgUpdateParams) ToProtoConsensusParams() (cmtproto.ConsensusParams, error) { |
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 this be a api breaking change?
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.
lgtm! but the backported PR to v0.47 should not be api breaking.
Co-authored-by: atheeshp <[email protected]> (cherry picked from commit ed14ec0) # Conflicts: # CHANGELOG.md
Co-authored-by: atheeshp <[email protected]> (cherry picked from commit ed14ec0) # Conflicts: # CHANGELOG.md # x/consensus/keeper/keeper.go # x/consensus/keeper/keeper_test.go # x/consensus/types/msgs.go
Co-authored-by: Marko <[email protected]> Co-authored-by: Julien Robert <[email protected]>
Co-authored-by: Marko <[email protected]>
Description
A40
check for nil params
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change