diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-21 21:46:26 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-21 21:46:26 +0800 |
commit | 0af0f0d890120e007ce42f072e1ee179a62115d3 (patch) | |
tree | 5ae9ecafbb729d1636fadfcfa49fd9100959560c /ethtrie/trie.go | |
parent | d761af84c83ae8d9d723e6766abb7950ff59cdf3 (diff) | |
parent | c173e9f4ab463cf3a44d35215bc29d846d6f6b02 (diff) | |
download | dexon-0af0f0d890120e007ce42f072e1ee179a62115d3.tar dexon-0af0f0d890120e007ce42f072e1ee179a62115d3.tar.gz dexon-0af0f0d890120e007ce42f072e1ee179a62115d3.tar.bz2 dexon-0af0f0d890120e007ce42f072e1ee179a62115d3.tar.lz dexon-0af0f0d890120e007ce42f072e1ee179a62115d3.tar.xz dexon-0af0f0d890120e007ce42f072e1ee179a62115d3.tar.zst dexon-0af0f0d890120e007ce42f072e1ee179a62115d3.zip |
Merge branch 'release/0.6.3'
Diffstat (limited to 'ethtrie/trie.go')
-rw-r--r-- | ethtrie/trie.go | 11 |
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() } |