Skip to content

Commit fb0964f

Browse files
committed
core/vm: optimize opCaller using uint256.Int.SetBytes20
1 parent 0ec6327 commit fb0964f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/vm/instructions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func opOrigin(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
262262
}
263263

264264
func opCaller(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
265-
scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Caller().Bytes()))
265+
scope.Stack.push(new(uint256.Int).SetBytes20(scope.Contract.Caller().Bytes()))
266266
return nil, nil
267267
}
268268

0 commit comments

Comments
 (0)