Hash hashes the RLP encoding of tx. It uniquely identifies the transaction.
()
| 187 | // Hash hashes the RLP encoding of tx. |
| 188 | // It uniquely identifies the transaction. |
| 189 | func (tx *Transaction) Hash() common.Hash { |
| 190 | if hash := tx.hash.Load(); hash != nil { |
| 191 | return hash.(common.Hash) |
| 192 | } |
| 193 | v := rlpHash(tx) |
| 194 | tx.hash.Store(v) |
| 195 | return v |
| 196 | } |
| 197 | |
| 198 | // Size returns the true RLP encoded storage size of the transaction, either by |
| 199 | // encoding and returning it, or returning a previsouly cached value. |