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

Method ValidateBasic

light/trust_options.go:39–53  ·  view source on GitHub ↗

ValidateBasic performs basic validation.

()

Source from the content-addressed store, hash-verified

37
38// ValidateBasic performs basic validation.
39func (opts TrustOptions) ValidateBasic() error {
40 if opts.Period <= 0 {
41 return errors.New("negative or zero period")
42 }
43 if opts.Height <= 0 {
44 return errors.New("negative or zero height")
45 }
46 if len(opts.Hash) != tmhash.Size {
47 return fmt.Errorf("expected hash size to be %d bytes, got %d bytes",
48 tmhash.Size,
49 len(opts.Hash),
50 )
51 }
52 return nil
53}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected