From e265415b47472c0266782fce5155d1ede624fd39 Mon Sep 17 00:00:00 2001 From: mpoke Date: Mon, 2 Sep 2024 10:55:46 +0200 Subject: [PATCH] apply review suggestions --- x/ccv/provider/types/msg.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/x/ccv/provider/types/msg.go b/x/ccv/provider/types/msg.go index 6eb89230a8..361ac79a2c 100644 --- a/x/ccv/provider/types/msg.go +++ b/x/ccv/provider/types/msg.go @@ -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()) } @@ -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") }