diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-24 01:35:36 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-24 01:35:36 +0800 |
commit | 780abaec988df302e0c98f1a35e9af35b5623746 (patch) | |
tree | dfd26765ec08d3df756730bb186639edb388b4ee /core/types/derive_sha.go | |
parent | 1054c155db8ac59b97b81fa7a7a20f2239eb1e82 (diff) | |
download | go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar.gz go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar.bz2 go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar.lz go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar.xz go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar.zst go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.zip |
Switched to new trie
Diffstat (limited to 'core/types/derive_sha.go')
-rw-r--r-- | core/types/derive_sha.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/types/derive_sha.go b/core/types/derive_sha.go index 1897ff198..0beb19670 100644 --- a/core/types/derive_sha.go +++ b/core/types/derive_sha.go @@ -2,7 +2,7 @@ package types import ( "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/trie" + "github.com/ethereum/go-ethereum/ptrie" ) type DerivableList interface { @@ -11,10 +11,10 @@ type DerivableList interface { } func DeriveSha(list DerivableList) []byte { - trie := trie.New(ethutil.Config.Db, "") + trie := ptrie.New(nil, ethutil.Config.Db) for i := 0; i < list.Len(); i++ { - trie.Update(string(ethutil.NewValue(i).Encode()), string(list.GetRlp(i))) + trie.Update(ethutil.Encode(i), list.GetRlp(i)) } - return trie.GetRoot() + return trie.Root() } |