core/vm: optimize opTload using uint256.Int.SetBytes32

This commit is contained in:
cuiweixie 2025-10-19 09:21:24 +08:00
parent 0ec63272bf
commit fbfeaea6f7
No known key found for this signature in database
GPG key ID: 16DF64EE15E495A3

View file

@ -203,7 +203,7 @@ func opTload(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
loc := scope.Stack.peek() loc := scope.Stack.peek()
hash := common.Hash(loc.Bytes32()) hash := common.Hash(loc.Bytes32())
val := evm.StateDB.GetTransientState(scope.Contract.Address(), hash) val := evm.StateDB.GetTransientState(scope.Contract.Address(), hash)
loc.SetBytes(val.Bytes()) loc.SetBytes32(val.Bytes())
return nil, nil return nil, nil
} }