Skip to content

Commit

Permalink
Merge pull request #364 from benbaley/develop
Browse files Browse the repository at this point in the history
get value from pending first
  • Loading branch information
benbaley authored Aug 10, 2022
2 parents d15c4ac + da692c0 commit fd415dc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,16 +663,15 @@ func (s *StateDB) getStateObjectSnapshot(addr common.Address, key []byte) []byte
return value
}

value, cached := obj.originStorage[string(key)]
if cached {
return value
}

value, pending := obj.pendingStorage[string(key)]
if pending {
return value
}

value, cached := obj.originStorage[string(key)]
if cached {
return value
}
}
return nil
}
Expand Down

0 comments on commit fd415dc

Please sign in to comment.