diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-08 18:47:04 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-08 18:47:04 +0800 |
commit | db4aaedcbdb409e17ea3de161e7b24a80ba0a58c (patch) | |
tree | 98a86ccc265ef05913b8e65a1ce2cae9c13ea788 /state | |
parent | 982c812e81304cad835796d4fa3d67c8f08141b6 (diff) | |
download | dexon-db4aaedcbdb409e17ea3de161e7b24a80ba0a58c.tar.gz dexon-db4aaedcbdb409e17ea3de161e7b24a80ba0a58c.tar.zst dexon-db4aaedcbdb409e17ea3de161e7b24a80ba0a58c.zip |
Moved ptrie => trie. Removed old trie
Diffstat (limited to 'state')
-rw-r--r-- | state/state_object.go | 6 | ||||
-rw-r--r-- | state/statedb.go | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/state/state_object.go b/state/state_object.go index c1c78bee0..913c57a31 100644 --- a/state/state_object.go +++ b/state/state_object.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/ptrie" + "github.com/ethereum/go-ethereum/trie" ) type Code []byte @@ -152,7 +152,7 @@ func (self *StateObject) Sync() { } /* - valid, t2 := ptrie.ParanoiaCheck(self.State.trie, ethutil.Config.Db) + valid, t2 := trie.ParanoiaCheck(self.State.trie, ethutil.Config.Db) if !valid { statelogger.Infof("Warn: PARANOIA: Different state storage root during copy %x vs %x\n", self.State.Root(), t2.Root()) @@ -273,7 +273,7 @@ func (c *StateObject) Init() Code { return c.InitCode } -func (self *StateObject) Trie() *ptrie.Trie { +func (self *StateObject) Trie() *trie.Trie { return self.State.trie } diff --git a/state/statedb.go b/state/statedb.go index de7314790..3176ab755 100644 --- a/state/statedb.go +++ b/state/statedb.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/ptrie" + "github.com/ethereum/go-ethereum/trie" ) var statelogger = logger.NewLogger("STATE") @@ -18,7 +18,7 @@ var statelogger = logger.NewLogger("STATE") // * Accounts type StateDB struct { db ethutil.Database - trie *ptrie.Trie + trie *trie.Trie stateObjects map[string]*StateObject @@ -30,9 +30,8 @@ type StateDB struct { } // Create a new state from a given trie -//func New(trie *ptrie.Trie) *StateDB { func New(root []byte, db ethutil.Database) *StateDB { - trie := ptrie.New(root, db) + trie := trie.New(root, db) return &StateDB{db: db, trie: trie, stateObjects: make(map[string]*StateObject), manifest: NewManifest(), refund: make(map[string]*big.Int)} } @@ -308,7 +307,7 @@ func (self *StateDB) Update(gasUsed *big.Int) { // FIXME trie delete is broken if deleted { - valid, t2 := ptrie.ParanoiaCheck(self.trie, self.db) + valid, t2 := trie.ParanoiaCheck(self.trie, self.db) if !valid { statelogger.Infof("Warn: PARANOIA: Different state root during copy %x vs %x\n", self.trie.Root(), t2.Root()) |