core/types/bal: ensure that a written storage slot which was previously read doesn't appear in both the read/write set in the BAL

Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
This commit is contained in:
Jared Wasinger 2026-03-24 11:39:17 -04:00
parent 974844c8d2
commit d1f0ab79ba

View file

@ -169,6 +169,9 @@ func (c ConstructionBlockAccessList) AccumulateMutations(muts StateMutations, id
c[addr].StorageWrites[key] = make(map[uint16]common.Hash)
}
c[addr].StorageWrites[key][idx] = val
// delete the key from the tracked reads if it was previously read.
delete(c[addr].StorageReads, key)
}
}
}