|
|
@@ -36,6 +36,7 @@ var encodeBufferPool = sync.Pool{
|
|
|
New: func() interface{} { return new(bytes.Buffer) },
|
|
|
}
|
|
|
|
|
|
+// rlpHash encodes x and hashes the encoded bytes.
|
|
|
func rlpHash(x interface{}) (h common.Hash) {
|
|
|
sha := hasherPool.Get().(crypto.KeccakState)
|
|
|
defer hasherPool.Put(sha)
|
|
|
@@ -45,8 +46,8 @@ func rlpHash(x interface{}) (h common.Hash) {
|
|
|
return h
|
|
|
}
|
|
|
|
|
|
-// prefixedRlpHash writes the prefix into the hasher before rlp-encoding the
|
|
|
-// given interface. It's used for typed transactions.
|
|
|
+// prefixedRlpHash writes the prefix into the hasher before rlp-encoding x.
|
|
|
+// It's used for typed transactions.
|
|
|
func prefixedRlpHash(prefix byte, x interface{}) (h common.Hash) {
|
|
|
sha := hasherPool.Get().(crypto.KeccakState)
|
|
|
defer hasherPool.Put(sha)
|