diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-11 22:23:38 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-11 22:23:38 +0800 |
commit | a760ce05b948e89bc564af20599dcf95698ac0eb (patch) | |
tree | e9a1f0161521bc895de45e683ba6904a0d4923f9 /ethstate/state.go | |
parent | 2e5d28c73f1d97865def3ffe8c7ad0a4819f15f3 (diff) | |
download | dexon-a760ce05b948e89bc564af20599dcf95698ac0eb.tar dexon-a760ce05b948e89bc564af20599dcf95698ac0eb.tar.gz dexon-a760ce05b948e89bc564af20599dcf95698ac0eb.tar.bz2 dexon-a760ce05b948e89bc564af20599dcf95698ac0eb.tar.lz dexon-a760ce05b948e89bc564af20599dcf95698ac0eb.tar.xz dexon-a760ce05b948e89bc564af20599dcf95698ac0eb.tar.zst dexon-a760ce05b948e89bc564af20599dcf95698ac0eb.zip |
Updated chain for filtering
Diffstat (limited to 'ethstate/state.go')
-rw-r--r-- | ethstate/state.go | 45 |
1 files changed, 4 insertions, 41 deletions
diff --git a/ethstate/state.go b/ethstate/state.go index 10bcf6335..19210916e 100644 --- a/ethstate/state.go +++ b/ethstate/state.go @@ -211,50 +211,13 @@ func (self *State) Update() { } } -// Debug stuff -func (self *State) CreateOutputForDiff() { - for _, stateObject := range self.stateObjects { - stateObject.CreateOutputForDiff() - } -} - func (self *State) Manifest() *Manifest { return self.manifest } -// Object manifest -// -// The object manifest is used to keep changes to the state so we can keep track of the changes -// that occurred during a state transitioning phase. -type Manifest struct { - // XXX These will be handy in the future. Not important for now. - objectAddresses map[string]bool - storageAddresses map[string]map[string]bool - - ObjectChanges map[string]*StateObject - StorageChanges map[string]map[string]*big.Int -} - -func NewManifest() *Manifest { - m := &Manifest{objectAddresses: make(map[string]bool), storageAddresses: make(map[string]map[string]bool)} - m.Reset() - - return m -} - -func (m *Manifest) Reset() { - m.ObjectChanges = make(map[string]*StateObject) - m.StorageChanges = make(map[string]map[string]*big.Int) -} - -func (m *Manifest) AddObjectChange(stateObject *StateObject) { - m.ObjectChanges[string(stateObject.Address())] = stateObject -} - -func (m *Manifest) AddStorageChange(stateObject *StateObject, storageAddr []byte, storage *big.Int) { - if m.StorageChanges[string(stateObject.Address())] == nil { - m.StorageChanges[string(stateObject.Address())] = make(map[string]*big.Int) +// Debug stuff +func (self *State) CreateOutputForDiff() { + for _, stateObject := range self.stateObjects { + stateObject.CreateOutputForDiff() } - - m.StorageChanges[string(stateObject.Address())][string(storageAddr)] = storage } |