Created
October 13, 2016 10:08
-
-
Save obscuren/37ab268e7e159ad3ea884a141546a67d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/state/statedb.go b/core/state/statedb.go | |
index ec9e939..465e986 100644 | |
--- a/core/state/statedb.go | |
+++ b/core/state/statedb.go | |
@@ -516,11 +516,15 @@ func (self *StateDB) GetRefund() *big.Int { | |
func (s *StateDB) IntermediateRoot() common.Hash { | |
for addr, _ := range s.stateObjectsDirty { | |
stateObject := s.stateObjects[addr] | |
- if stateObject.suicided { | |
+ if /* some block && */ (stateObject.data == Account{}) { | |
s.deleteStateObject(stateObject) | |
} else { | |
- stateObject.updateRoot(s.db) | |
- s.updateStateObject(stateObject) | |
+ if stateObject.suicided { | |
+ s.deleteStateObject(stateObject) | |
+ } else { | |
+ stateObject.updateRoot(s.db) | |
+ s.updateStateObject(stateObject) | |
+ } | |
} | |
} | |
// Invalidate journal because reverting across transactions is not allowed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment