MCPcopy Create free account
hub / github.com/tendermint/tendermint / ValidateBasic

Method ValidateBasic

types/block_meta.go:69–78  ·  view source on GitHub ↗

ValidateBasic performs basic validation.

()

Source from the content-addressed store, hash-verified

67
68// ValidateBasic performs basic validation.
69func (bm *BlockMeta) ValidateBasic() error {
70 if err := bm.BlockID.ValidateBasic(); err != nil {
71 return err
72 }
73 if !bytes.Equal(bm.BlockID.Hash, bm.Header.Hash()) {
74 return fmt.Errorf("expected BlockID#Hash and Header#Hash to be the same, got %X != %X",
75 bm.BlockID.Hash, bm.Header.Hash())
76 }
77 return nil
78}

Callers

nothing calls this directly

Calls 3

ValidateBasicMethod · 0.65
EqualMethod · 0.65
HashMethod · 0.65

Tested by

no test coverage detected