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

Function NonceTuple

protocol/txvm/anchors.go:26–28  ·  view source on GitHub ↗

NonceTuple computes a nonce tuple suitable for logging (with vm.log(nonce...)) or hashing (with NonceHash).

(callerSeed, selfSeed, blockID []byte, expTimeMS int64)

Source from the content-addressed store, hash-verified

24// NonceTuple computes a nonce tuple suitable for logging (with
25// vm.log(nonce...)) or hashing (with NonceHash).
26func NonceTuple(callerSeed, selfSeed, blockID []byte, expTimeMS int64) Tuple {
27 return Tuple{Bytes{NonceCode}, Bytes(callerSeed), Bytes(selfSeed), Bytes(blockID), Int(expTimeMS)}
28}
29
30// NonceHash computes the hash of a nonce tuple.
31func NonceHash(nonce Tuple) [32]byte {

Callers 2

materializeTxMethod · 0.92
logNonceMethod · 0.85

Calls 2

BytesTypeAlias · 0.85
IntTypeAlias · 0.85

Tested by

no test coverage detected