diff options
Diffstat (limited to 'core/types/derive_sha.go')
-rw-r--r-- | core/types/derive_sha.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/types/derive_sha.go b/core/types/derive_sha.go index 593a31f1c..0fc45a508 100644 --- a/core/types/derive_sha.go +++ b/core/types/derive_sha.go @@ -1,8 +1,8 @@ package types import ( - "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/trie" ) @@ -11,12 +11,12 @@ type DerivableList interface { GetRlp(i int) []byte } -func DeriveSha(list DerivableList) []byte { +func DeriveSha(list DerivableList) common.Hash { db, _ := ethdb.NewMemDatabase() trie := trie.New(nil, db) for i := 0; i < list.Len(); i++ { trie.Update(common.Encode(i), list.GetRlp(i)) } - return trie.Root() + return common.BytesToHash(trie.Root()) } |