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

Method Hash

types/legacy_types.go:319–326  ·  view source on GitHub ↗

Hash hashes the RLP encoding of tx. It uniquely identifies the transaction.

()

Source from the content-addressed store, hash-verified

317// Hash hashes the RLP encoding of tx.
318// It uniquely identifies the transaction.
319func (tx *TransactionOld) Hash() common.Hash {
320 if hash := tx.hash.Load(); hash != nil {
321 return hash.(common.Hash)
322 }
323 v := rlpHash(tx)
324 tx.hash.Store(v)
325 return v
326}
327
328// Size returns the true RLP encoded storage size of the transaction, either by
329// encoding and returning it, or returning a previsouly cached value.

Callers 1

MarshalJSONMethod · 0.95

Calls 1

rlpHashFunction · 0.70

Tested by

no test coverage detected