Refactored ethutil.Config.Db out
This commit is contained in:
14
trie/trie.go
14
trie/trie.go
@ -1,5 +1,6 @@
|
||||
package trie
|
||||
|
||||
/*
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
@ -174,11 +175,9 @@ func New(db ethutil.Database, Root interface{}) *Trie {
|
||||
func (self *Trie) setRoot(root interface{}) {
|
||||
switch t := root.(type) {
|
||||
case string:
|
||||
/*
|
||||
if t == "" {
|
||||
root = crypto.Sha3(ethutil.Encode(""))
|
||||
}
|
||||
*/
|
||||
//if t == "" {
|
||||
// root = crypto.Sha3(ethutil.Encode(""))
|
||||
//}
|
||||
self.Root = []byte(t)
|
||||
case []byte:
|
||||
self.Root = root
|
||||
@ -187,10 +186,6 @@ func (self *Trie) setRoot(root interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Public (query) interface functions
|
||||
*/
|
||||
|
||||
func (t *Trie) Update(key, value string) {
|
||||
t.mut.Lock()
|
||||
defer t.mut.Unlock()
|
||||
@ -629,3 +624,4 @@ func (it *TrieIterator) iterateNode(key []byte, currentNode *ethutil.Value, cb E
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user