Skip to content

Commit

Permalink
apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed Sep 2, 2024
1 parent e747616 commit e265415
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions x/ccv/provider/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (msg MsgSubmitConsumerDoubleVoting) ValidateBasic() error {
}
}

if err := ValidateTendermintHeader(msg.InfractionBlockHeader); err != nil {
if err := ValidateHeaderForConsumerDoubleVoting(msg.InfractionBlockHeader); err != nil {
return errorsmod.Wrapf(ErrInvalidMsgSubmitConsumerDoubleVoting, "ValidateTendermintHeader: %s", err.Error())
}

Expand Down Expand Up @@ -395,8 +395,11 @@ func ParseConsumerKeyFromJson(jsonStr string) (pkType, key string, err error) {
return pubKey.Type, pubKey.Key, nil
}

// TODO create UT
func ValidateTendermintHeader(header *ibctmtypes.Header) error {
// ValidateHeaderForConsumerDoubleVoting validates Tendermint light client header
// for consumer double voting evidence.
//
// TODO create unit test
func ValidateHeaderForConsumerDoubleVoting(header *ibctmtypes.Header) error {
if header == nil {
return fmt.Errorf("infraction block header cannot be nil")
}
Expand Down

0 comments on commit e265415

Please sign in to comment.