Skip to content

Commit d7bb4f6

Browse files
qdm12ARR4N
andauthored
feat(core/types): export rlpHash() (#174)
#163 was removed by mistake in #162 so this re-adds it Co-authored-by: Arran Schlosberg <[email protected]>
1 parent 979064c commit d7bb4f6

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)