MCPcopy Create free account
hub / github.com/chain/txvm / NonceCommitment

Function NonceCommitment

protocol/bc/hash.go:138–143  ·  view source on GitHub ↗

NonceCommitment returns the byte commitment for the given nonce id and expiration.

(id Hash, expms uint64)

Source from the content-addressed store, hash-verified

136// NonceCommitment returns the byte commitment
137// for the given nonce id and expiration.
138func NonceCommitment(id Hash, expms uint64) []byte {
139 b := make([]byte, 40)
140 copy(b[:32], id.Bytes())
141 binary.LittleEndian.PutUint64(b[32:], expms)
142 return b
143}

Callers 2

TestApplyBlockFunction · 0.92
NewCommitmentsTxFunction · 0.85

Calls 1

BytesMethod · 0.45

Tested by 1

TestApplyBlockFunction · 0.74