diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-31 17:59:17 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-31 17:59:17 +0800 |
commit | 3ee0461cb5b6e4a5e2d287180afbdb681805a662 (patch) | |
tree | f245667a9e3f5f0ff23bb1c89f4f7cc783f4949c /ethchain/derive_sha.go | |
parent | 8e0a39f33f9d24ebeca9cc88edf24cc6294552d7 (diff) | |
download | go-tangerine-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar go-tangerine-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.gz go-tangerine-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.bz2 go-tangerine-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.lz go-tangerine-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.xz go-tangerine-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.zst go-tangerine-3ee0461cb5b6e4a5e2d287180afbdb681805a662.zip |
Moved ethchain to chain
Diffstat (limited to 'ethchain/derive_sha.go')
-rw-r--r-- | ethchain/derive_sha.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/ethchain/derive_sha.go b/ethchain/derive_sha.go deleted file mode 100644 index b41252e39..000000000 --- a/ethchain/derive_sha.go +++ /dev/null @@ -1,20 +0,0 @@ -package ethchain - -import ( - "github.com/ethereum/go-ethereum/ethtrie" - "github.com/ethereum/go-ethereum/ethutil" -) - -type DerivableList interface { - Len() int - GetRlp(i int) []byte -} - -func DeriveSha(list DerivableList) []byte { - trie := ethtrie.New(ethutil.Config.Db, "") - for i := 0; i < list.Len(); i++ { - trie.Update(string(ethutil.NewValue(i).Encode()), string(list.GetRlp(i))) - } - - return trie.GetRoot() -} |