Skip to content

Commit 05a2af4

Browse files
committed
core/vm: remove unnecessary memset for Memory.Set32
1 parent 86d5477 commit 05a2af4

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

core/vm/memory.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ func (m *Memory) Set32(offset uint64, val *uint256.Int) {
5555
if offset+32 > uint64(len(m.store)) {
5656
panic("invalid memory: store empty")
5757
}
58-
// Zero the memory area
59-
copy(m.store[offset:offset+32], []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
6058
// Fill in relevant bits
6159
val.WriteToSlice(m.store[offset:])
6260
}

0 commit comments

Comments
 (0)