aboutsummaryrefslogtreecommitdiffstats
path: root/core/state/state_object.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-10-06 04:22:31 +0800
committerFelix Lange <fjl@twurst.com>2016-10-06 21:32:17 +0800
commit90fce8bfa621f8c3be6663d62740783949111ff1 (patch)
treeae93f2f9f637f0530eb0cedc354871ca377717ad /core/state/state_object.go
parent1f1ea18b5414bea22332bb4fce53cc95b5c6a07d (diff)
downloadgo-tangerine-90fce8bfa621f8c3be6663d62740783949111ff1.tar
go-tangerine-90fce8bfa621f8c3be6663d62740783949111ff1.tar.gz
go-tangerine-90fce8bfa621f8c3be6663d62740783949111ff1.tar.bz2
go-tangerine-90fce8bfa621f8c3be6663d62740783949111ff1.tar.lz
go-tangerine-90fce8bfa621f8c3be6663d62740783949111ff1.tar.xz
go-tangerine-90fce8bfa621f8c3be6663d62740783949111ff1.tar.zst
go-tangerine-90fce8bfa621f8c3be6663d62740783949111ff1.zip
core/state: rename Delete/IsDeleted to Suicide/HasSuicided
The delete/remove naming has caused endless confusion in the past.
Diffstat (limited to 'core/state/state_object.go')
-rw-r--r--core/state/state_object.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/state/state_object.go b/core/state/state_object.go
index 31ff9bcd8..a6b6028bc 100644
--- a/core/state/state_object.go
+++ b/core/state/state_object.go
@@ -83,10 +83,10 @@ type StateObject struct {
dirtyStorage Storage // Storage entries that need to be flushed to disk
// Cache flags.
- // When an object is marked for deletion it will be delete from the trie
- // during the "update" phase of the state transition
+ // When an object is marked suicided it will be delete from the trie
+ // during the "update" phase of the state transition.
dirtyCode bool // true if the code was updated
- remove bool
+ suicided bool
deleted bool
onDirty func(addr common.Address) // Callback method to mark a state object newly dirty
}
@@ -123,8 +123,8 @@ func (self *StateObject) setError(err error) {
}
}
-func (self *StateObject) markForDeletion() {
- self.remove = true
+func (self *StateObject) markSuicided() {
+ self.suicided = true
if self.onDirty != nil {
self.onDirty(self.Address())
self.onDirty = nil
@@ -266,7 +266,7 @@ func (self *StateObject) deepCopy(db *StateDB, onDirty func(addr common.Address)
stateObject.code = self.code
stateObject.dirtyStorage = self.dirtyStorage.Copy()
stateObject.cachedStorage = self.dirtyStorage.Copy()
- stateObject.remove = self.remove
+ stateObject.suicided = self.suicided
stateObject.dirtyCode = self.dirtyCode
stateObject.deleted = self.deleted
return stateObject