aboutsummaryrefslogtreecommitdiffstats
path: root/ethtrie/trie.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-04 16:38:18 +0800
committerobscuren <geffobscura@gmail.com>2014-08-04 16:38:18 +0800
commit3debeb7236d2c8474fa9049cc91dc26bf1040b3f (patch)
tree928b5ff8486ea485a3efae8cc69adaf54af9c87e /ethtrie/trie.go
parent2e7cf835222274a311302c33498cf83bb2593b7a (diff)
downloadgo-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar
go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar.gz
go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar.bz2
go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar.lz
go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar.xz
go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar.zst
go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.zip
ethtrie.NewTrie => ethtrie.New
Diffstat (limited to 'ethtrie/trie.go')
-rw-r--r--ethtrie/trie.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/ethtrie/trie.go b/ethtrie/trie.go
index f0f3fe5a8..38ae0754d 100644
--- a/ethtrie/trie.go
+++ b/ethtrie/trie.go
@@ -3,16 +3,17 @@ package ethtrie
import (
"bytes"
"fmt"
- "github.com/ethereum/eth-go/ethcrypto"
- "github.com/ethereum/eth-go/ethutil"
_ "reflect"
"sync"
+
+ "github.com/ethereum/eth-go/ethcrypto"
+ "github.com/ethereum/eth-go/ethutil"
)
func __ignore() { fmt.Println("") }
func ParanoiaCheck(t1 *Trie) (bool, *Trie) {
- t2 := NewTrie(ethutil.Config.Db, "")
+ t2 := New(ethutil.Config.Db, "")
t1.NewIterator().Each(func(key string, v *ethutil.Value) {
t2.Update(key, v.Str())
@@ -158,7 +159,7 @@ func copyRoot(root interface{}) interface{} {
return prevRootCopy
}
-func NewTrie(db ethutil.Database, Root interface{}) *Trie {
+func New(db ethutil.Database, Root interface{}) *Trie {
// Make absolute sure the root is copied
r := copyRoot(Root)
p := copyRoot(Root)
@@ -221,7 +222,7 @@ func (t *Trie) Cmp(trie *Trie) bool {
// Returns a copy of this trie
func (t *Trie) Copy() *Trie {
- trie := NewTrie(t.cache.db, t.Root)
+ trie := New(t.cache.db, t.Root)
for key, node := range t.cache.nodes {
trie.cache.nodes[key] = node.Copy()
}