core/state: rename Delete/IsDeleted to Suicide/HasSuicided

The delete/remove naming has caused endless confusion in the past.
This commit is contained in:
Felix Lange
2016-10-05 22:22:31 +02:00
parent 1f1ea18b54
commit 90fce8bfa6
9 changed files with 35 additions and 32 deletions

View File

@ -36,7 +36,7 @@ type (
resetObjectChange struct {
prev *StateObject
}
deleteAccountChange struct {
suicideChange struct {
account *common.Address
prev bool // whether account had already suicided
prevbalance *big.Int
@ -79,10 +79,10 @@ func (ch resetObjectChange) undo(s *StateDB) {
s.setStateObject(ch.prev)
}
func (ch deleteAccountChange) undo(s *StateDB) {
func (ch suicideChange) undo(s *StateDB) {
obj := s.GetStateObject(*ch.account)
if obj != nil {
obj.remove = ch.prev
obj.suicided = ch.prev
obj.setBalance(ch.prevbalance)
}
}