From 432a8ff4e6a36d0e7e92c21a97ff40d1531bda45 Mon Sep 17 00:00:00 2001 From: ucwong Date: Tue, 17 Dec 2024 23:15:03 +0800 Subject: [PATCH] use faster method to write to memory --- core/vm/memory.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/vm/memory.go b/core/vm/memory.go index 21115c72d2..0b829b8d4a 100644 --- a/core/vm/memory.go +++ b/core/vm/memory.go @@ -75,8 +75,7 @@ func (m *Memory) Set32(offset uint64, val *uint256.Int) { panic("invalid memory: store empty") } // Fill in relevant bits - b32 := val.Bytes32() - copy(m.store[offset:], b32[:]) + val.PutUint256(m.store[offset:]) } // Resize resizes the memory to size