ValidateBasic performs basic validation.
()
| 37 | |
| 38 | // ValidateBasic performs basic validation. |
| 39 | func (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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected