MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / buildHash

Function buildHash

types/util.go:48–56  ·  view source on GitHub ↗
(data canMarshalHash, h *hash.Hash)

Source from the content-addressed store, hash-verified

46}
47
48func buildHash(data canMarshalHash, h *hash.Hash) (err error) {
49 var hashBytes []byte
50 if hashBytes, err = data.MarshalHash(); err != nil {
51 return
52 }
53 newHash := hash.THashH(hashBytes)
54 copy(h[:], newHash[:])
55 return
56}
57
58// CreateRandomBlock create a new random block
59func CreateRandomBlock(parent hash.Hash, isGenesis bool) (b *Block, err error) {

Callers 4

SignMethod · 0.85
verifyHashFunction · 0.85
BuildHashMethod · 0.85
BuildHashMethod · 0.85

Calls 2

THashHFunction · 0.92
MarshalHashMethod · 0.65

Tested by

no test coverage detected