(txHash common.Hash)
| 81 | } |
| 82 | |
| 83 | func 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 | } |
no test coverage detected