MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / ValidateBasic

Method ValidateBasic

consensus/reactor.go:1684–1695  ·  view source on GitHub ↗

ValidateBasic performs basic validation.

()

Source from the content-addressed store, hash-verified

1682
1683// ValidateBasic performs basic validation.
1684func (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.
1698func (m *BlockPartMessage) String() string {

Callers 1

Calls 1

ValidateBasicMethod · 0.65

Tested by 1