Skip to content

Commit 433c606

Browse files
authored
feat(core/types): export rlpHash() (#163)
## Why this should be merged Allows `core/types/hashing.go` to be deleted from `coreth`. ## How this works Exported function acts as a proxy for unexported upstream function. ## How this was tested NA
1 parent b0332b5 commit 433c606

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/types/rlp_payload.libevm.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"fmt"
2121
"io"
2222

23+
"github.com/ava-labs/libevm/common"
2324
"github.com/ava-labs/libevm/libevm/pseudo"
2425
"github.com/ava-labs/libevm/libevm/register"
2526
"github.com/ava-labs/libevm/libevm/testonly"
@@ -365,3 +366,8 @@ func (e *StateAccountExtra) Format(s fmt.State, verb rune) {
365366
}
366367
_, _ = s.Write([]byte(out))
367368
}
369+
370+
// RLPHash returns the hash of the RLP encoding of `x`.
371+
func RLPHash(x any) common.Hash {
372+
return rlpHash(x)
373+
}

0 commit comments

Comments
 (0)