MCPcopy Create free account
hub / github.com/chain/Core / Hash

Method Hash

protocol/bc/legacy/output_commitment.go:73–79  ·  view source on GitHub ↗
(suffix []byte, assetVersion uint64)

Source from the content-addressed store, hash-verified

71}
72
73func (oc *OutputCommitment) Hash(suffix []byte, assetVersion uint64) (outputhash bc.Hash) {
74 h := sha3pool.Get256()
75 defer sha3pool.Put256(h)
76 oc.writeExtensibleString(h, suffix, assetVersion) // TODO(oleg): get rid of this assetVersion parameter to actually write all the bytes
77 outputhash.ReadFrom(h)
78 return outputhash
79}

Callers

nothing calls this directly

Calls 2

writeExtensibleStringMethod · 0.95
ReadFromMethod · 0.45

Tested by

no test coverage detected