From 8d5cd0b30f788d73129bed38bd1dd1d89c211bc8 Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Sun, 19 Oct 2025 00:35:31 +0800 Subject: [PATCH] core/vm: optimize opSload using uint256.Int.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..307c8c4e42 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -513,7 +513,7 @@ func opSload(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) { loc := scope.Stack.peek() hash := common.Hash(loc.Bytes32()) val := evm.StateDB.GetState(scope.Contract.Address(), hash) - loc.SetBytes(val.Bytes()) + loc.SetBytes32(val.Bytes()) return nil, nil }