Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhang2023 committed Oct 17, 2024
1 parent d8f7d17 commit bcdf7a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/state/pevm_statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,13 +662,14 @@ func (pst *UncommittedDB) getDeletedObjectWithState(addr common.Address, maindb
return o
}
// first, load code from maindb and record the previous state
// we can't use getStateObject() here , because it will be used for conflict check.
// we can't use getStateObject() here , because the state of deletedObj will be used for conflict check.
deletedObj := pst.maindb.getDeletedStateObject(addr)
if deletedObj != nil {
// record the previous state for conflict check.
pst.reads.recordKVOnce(addr, hash, deletedObj.GetState(hash))
}

// now return the true state into cache
// now write the true state into cache
var value = common.Hash{}
if deletedObj != nil && !deletedObj.deleted {
value = deletedObj.GetState(hash)
Expand Down

0 comments on commit bcdf7a1

Please sign in to comment.