ValidateBasic performs basic validation.
()
| 1194 | |
| 1195 | // ValidateBasic performs basic validation. |
| 1196 | func (blockID BlockID) ValidateBasic() error { |
| 1197 | // Hash can be empty in case of POLBlockID in Proposal. |
| 1198 | if err := ValidateHash(blockID.Hash); err != nil { |
| 1199 | return fmt.Errorf("wrong Hash: %w", err) |
| 1200 | } |
| 1201 | if err := blockID.PartSetHeader.ValidateBasic(); err != nil { |
| 1202 | return fmt.Errorf("wrong PartSetHeader: %w", err) |
| 1203 | } |
| 1204 | return nil |
| 1205 | } |
| 1206 | |
| 1207 | // IsZero returns true if this is the BlockID of a nil block. |
| 1208 | func (blockID BlockID) IsZero() bool { |