diff --git a/types/validator_set.go b/types/validator_set.go index b97cc9d5c..b8e0c847f 100644 --- a/types/validator_set.go +++ b/types/validator_set.go @@ -910,9 +910,7 @@ func (vals *ValidatorSet) ToProto() (*tmproto.ValidatorSet, error) { if vals == nil { return nil, errors.New("nil validator set") // validator set should never be nil } - if err := vals.ValidateBasic(); err != nil { - return nil, fmt.Errorf("validator set failed basic: %w", err) - } + vp := new(tmproto.ValidatorSet) valsProto := make([]*tmproto.Validator, len(vals.Validators)) for i := 0; i < len(vals.Validators); i++ { @@ -963,7 +961,7 @@ func ValidatorSetFromProto(vp *tmproto.ValidatorSet) (*ValidatorSet, error) { vals.totalVotingPower = vp.GetTotalVotingPower() - return vals, nil + return vals, vals.ValidateBasic() } //----------------------------------------