ValidateBasic performs basic validation.
()
| 1682 | |
| 1683 | // ValidateBasic performs basic validation. |
| 1684 | func (m *BlockPartMessage) ValidateBasic() error { |
| 1685 | if m.Height < 0 { |
| 1686 | return errors.New("negative Height") |
| 1687 | } |
| 1688 | if m.Round < 0 { |
| 1689 | return errors.New("negative Round") |
| 1690 | } |
| 1691 | if err := m.Part.ValidateBasic(); err != nil { |
| 1692 | return fmt.Errorf("wrong Part: %v", err) |
| 1693 | } |
| 1694 | return nil |
| 1695 | } |
| 1696 | |
| 1697 | // String returns a string representation. |
| 1698 | func (m *BlockPartMessage) String() string { |