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

This commit is contained in:
cuiweixie 2025-10-19 00:48:49 +08:00
parent 0ec63272bf
commit 2bf33638ae
No known key found for this signature in database
GPG key ID: 16DF64EE15E495A3

View file

@ -275,7 +275,7 @@ func opCallDataLoad(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
x := scope.Stack.peek()
if offset, overflow := x.Uint64WithOverflow(); !overflow {
data := getData(scope.Contract.Input, offset, 32)
x.SetBytes(data)
x.SetBytes32(data)
} else {
x.Clear()
}