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

Method SigHash

protocol/bc/tx.go:20–28  ·  view source on GitHub ↗
(n uint32)

Source from the content-addressed store, hash-verified

18}
19
20func (tx *Tx) SigHash(n uint32) (hash Hash) {
21 hasher := sha3pool.Get256()
22 defer sha3pool.Put256(hasher)
23
24 tx.InputIDs[n].WriteTo(hasher)
25 tx.ID.WriteTo(hasher)
26 hash.ReadFrom(hasher)
27 return hash
28}
29
30// Convenience routines for accessing entries of specific types by ID.
31

Callers 5

NewIssuanceTxFunction · 0.95
TestTxSighashCommitmentFunction · 0.95
signMethod · 0.80
checkTxSighashCommitmentFunction · 0.80
HashMethod · 0.80

Calls 2

WriteToMethod · 0.45
ReadFromMethod · 0.45

Tested by 2

TestTxSighashCommitmentFunction · 0.76
signMethod · 0.64