This is because one of its consumers (types.Header) will move out of the types package.pull/1498/head
parent
cefa1d99cd
commit
b263073252
@ -0,0 +1,15 @@ |
||||
package hash |
||||
|
||||
import ( |
||||
"github.com/ethereum/go-ethereum/common" |
||||
"github.com/ethereum/go-ethereum/rlp" |
||||
"golang.org/x/crypto/sha3" |
||||
) |
||||
|
||||
// FromRLP hashes the RLP representation of the given object.
|
||||
func FromRLP(x interface{}) (h common.Hash) { |
||||
hw := sha3.NewLegacyKeccak256() |
||||
rlp.Encode(hw, x) |
||||
hw.Sum(h[:0]) |
||||
return h |
||||
} |
Loading…
Reference in new issue