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

Method Hash

protocol/bc/legacy/spend.go:143–149  ·  view source on GitHub ↗
(suffix []byte, assetVersion uint64)

Source from the content-addressed store, hash-verified

141}
142
143func (sc *SpendCommitment) Hash(suffix []byte, assetVersion uint64) (spendhash bc.Hash) {
144 h := sha3pool.Get256()
145 defer sha3pool.Put256(h)
146 sc.writeExtensibleString(h, suffix, assetVersion) // TODO(oleg): get rid of this assetVersion parameter to actually write all the bytes
147 spendhash.ReadFrom(h)
148 return spendhash
149}

Callers 3

TestEmptyBlockFunction · 0.45
WriteInputCommitmentMethod · 0.45
CommitmentHashMethod · 0.45

Calls 2

writeExtensibleStringMethod · 0.95
ReadFromMethod · 0.45

Tested by 1

TestEmptyBlockFunction · 0.36