Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit 4031b8a

Browse files
authored
Fix alt mempool regression for invalidStorageAccess exception (#373)
1 parent 7efd9a8 commit 4031b8a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/entrypoint/simulation/storageslots.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ func (v *storageSlotsValidator) Process() ([]string, error) {
134134
} else {
135135
continue
136136
}
137-
} else if isAssociatedWith(entitySlots, slot) || mode == accessModeRead {
138-
mustStakeSlot = slot
139-
} else if ids := v.AltMempools.HasInvalidStorageAccessException(
137+
} else if amIds := v.AltMempools.HasInvalidStorageAccessException(
140138
v.EntityName,
141139
addr2KnownEntity(v.Op, addr),
142-
fmt.Sprintf("0x%s", slot),
143-
); len(ids) > 0 {
144-
altMempoolIds = append(altMempoolIds, ids...)
140+
slot,
141+
); (isAssociatedWith(entitySlots, slot) || mode == accessModeRead) && len(amIds) == 0 {
142+
mustStakeSlot = slot
143+
} else if len(amIds) > 0 {
144+
altMempoolIds = append(altMempoolIds, amIds...)
145145
} else {
146146
return altMempoolIds, fmt.Errorf(
147147
"%s has forbidden %s to %s slot %s",

0 commit comments

Comments
 (0)