diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-07-04 18:42:13 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-07-04 18:42:13 +0800 |
commit | 9c3db1be1dd24c366a58a7ced22adfa0b0839efe (patch) | |
tree | 0c102cd7f590a80bc291b82274e7ca16335a250f /core/state/state_object.go | |
parent | 9bb575be7db85f967771018a915fbc4e80345ee2 (diff) | |
parent | 47460b3b4af51e08518c781680897cf2986415cc (diff) | |
download | dexon-9c3db1be1dd24c366a58a7ced22adfa0b0839efe.tar.gz dexon-9c3db1be1dd24c366a58a7ced22adfa0b0839efe.tar.zst dexon-9c3db1be1dd24c366a58a7ced22adfa0b0839efe.zip |
Merge pull request #1369 from obscuren/statedb-update-cleanup
core, core/state: throw out intermediate state
Diffstat (limited to 'core/state/state_object.go')
-rw-r--r-- | core/state/state_object.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/core/state/state_object.go b/core/state/state_object.go index a31c182d2..e40aeda82 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -57,8 +57,6 @@ type StateObject struct { initCode Code // Cached storage (flushed when updated) storage Storage - // Temporary prepaid gas, reward after transition - prepaid *big.Int // Total gas pool is the total amount of gas currently // left if this object is the coinbase. Gas is directly @@ -77,14 +75,10 @@ func (self *StateObject) Reset() { } func NewStateObject(address common.Address, db common.Database) *StateObject { - // This to ensure that it has 20 bytes (and not 0 bytes), thus left or right pad doesn't matter. - //address := common.ToAddress(addr) - object := &StateObject{db: db, address: address, balance: new(big.Int), gasPool: new(big.Int), dirty: true} object.trie = trie.NewSecure((common.Hash{}).Bytes(), db) object.storage = make(Storage) object.gasPool = new(big.Int) - object.prepaid = new(big.Int) return object } @@ -110,7 +104,6 @@ func NewStateObjectFromBytes(address common.Address, data []byte, db common.Data object.trie = trie.NewSecure(extobject.Root[:], db) object.storage = make(map[string]common.Hash) object.gasPool = new(big.Int) - object.prepaid = new(big.Int) object.code, _ = db.Get(extobject.CodeHash) return object @@ -172,7 +165,6 @@ func (self *StateObject) Update() { self.setAddr([]byte(key), value) } - self.storage = make(Storage) } func (c *StateObject) GetInstr(pc *big.Int) *common.Value { |