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

Function getPrivateReceiptKey

core/private_database.go:83–94  ·  view source on GitHub ↗
(txHash common.Hash)

Source from the content-addressed store, hash-verified

81}
82
83func getPrivateReceiptKey(txHash common.Hash) common.Hash {
84 // Generate hash combining tx hash and private receipt prefix.
85 // It aims at avoiding conflict.
86 contentToHash := bytes.Join([][]byte{
87 privateReceiptPrefix,
88 txHash.Bytes(),
89 }, []byte{})
90 hasher := sha3.NewKeccak256()
91 hasher.Write(contentToHash)
92 hashBytes := hasher.Sum(nil)
93 return common.BytesToHash(hashBytes)
94}

Callers 2

WritePrivateReceiptFunction · 0.85
ReadPrivateReceiptFunction · 0.85

Calls 2

BytesMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected