Skip to content

Commit

Permalink
core/statedb: always clear out access list when setting a new one (#1702
Browse files Browse the repository at this point in the history
)

Co-authored-by: Péter Szilágyi <[email protected]>
  • Loading branch information
NathanBSC and karalabe authored Jun 15, 2023
1 parent e31270a commit 486e019
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1677,6 +1677,9 @@ func (s *StateDB) SnapToDiffLayer() ([]common.Address, []types.DiffAccount, []ty
//
// This method should only be called if Berlin/2929+2930 is applicable at the current number.
func (s *StateDB) PrepareAccessList(sender common.Address, dst *common.Address, precompiles []common.Address, list types.AccessList) {
// Clear out any leftover from previous executions
s.accessList = newAccessList()

s.AddAddressToAccessList(sender)
if dst != nil {
s.AddAddressToAccessList(*dst)
Expand Down

0 comments on commit 486e019

Please sign in to comment.