MCPcopy Create free account
hub / github.com/tendermint/tendermint / ValidateBasic

Method ValidateBasic

types/validator_set.go:82–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80}
81
82func (vals *ValidatorSet) ValidateBasic() error {
83 if vals.IsNilOrEmpty() {
84 return errors.New("validator set is nil or empty")
85 }
86
87 for idx, val := range vals.Validators {
88 if err := val.ValidateBasic(); err != nil {
89 return fmt.Errorf("invalid validator #%d: %w", idx, err)
90 }
91 }
92
93 if err := vals.Proposer.ValidateBasic(); err != nil {
94 return fmt.Errorf("proposer failed validate basic, error: %w", err)
95 }
96
97 return nil
98}
99
100// IsNilOrEmpty returns true if validator set is nil or empty.
101func (vals *ValidatorSet) IsNilOrEmpty() bool {

Callers

nothing calls this directly

Calls 2

IsNilOrEmptyMethod · 0.95
ValidateBasicMethod · 0.65

Tested by

no test coverage detected