core/vm: optimize opOrigin using uint256.Int.SetBytes20

This commit is contained in:
cuiweixie 2025-10-19 00:44:52 +08:00
parent 0ec63272bf
commit 3b58fec082
No known key found for this signature in database
GPG key ID: 16DF64EE15E495A3

View file

@ -257,7 +257,7 @@ func opBalance(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
}
func opOrigin(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
scope.Stack.push(new(uint256.Int).SetBytes(evm.Origin.Bytes()))
scope.Stack.push(new(uint256.Int).SetBytes20(evm.Origin.Bytes()))
return nil, nil
}