ValidateBasic performs basic validation.
()
| 1760 | |
| 1761 | // ValidateBasic performs basic validation. |
| 1762 | func (m *VoteSetMaj23Message) ValidateBasic() error { |
| 1763 | if m.Height < 0 { |
| 1764 | return errors.New("negative Height") |
| 1765 | } |
| 1766 | if m.Round < 0 { |
| 1767 | return errors.New("negative Round") |
| 1768 | } |
| 1769 | if !types.IsVoteTypeValid(m.Type) { |
| 1770 | return errors.New("invalid Type") |
| 1771 | } |
| 1772 | if err := m.BlockID.ValidateBasic(); err != nil { |
| 1773 | return fmt.Errorf("wrong BlockID: %v", err) |
| 1774 | } |
| 1775 | return nil |
| 1776 | } |
| 1777 | |
| 1778 | // String returns a string representation. |
| 1779 | func (m *VoteSetMaj23Message) String() string { |