From 7694b25e8f77c27398a33fdb5f8ea8af2c5e4068 Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Sun, 19 Oct 2025 00:27:35 +0800 Subject: [PATCH] core/vm: optimize opBlockhash using uint256.SetBytes32 --- core/vm/instructions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 44d3e81a9c..48e5d28bcd 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -445,7 +445,7 @@ func opBlockhash(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) { if tracer := evm.Config.Tracer; tracer != nil && tracer.OnBlockHashRead != nil { tracer.OnBlockHashRead(num64, res) } - num.SetBytes(res[:]) + num.SetBytes32(res[:]) } else { num.Clear() }