core/vm: optimize opCoinbase instruction using uint256.SetBytes20

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

View file

@ -453,7 +453,7 @@ func opBlockhash(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
}
func opCoinbase(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
scope.Stack.push(new(uint256.Int).SetBytes(evm.Context.Coinbase.Bytes()))
scope.Stack.push(new(uint256.Int).SetBytes20(evm.Context.Coinbase.Bytes()))
return nil, nil
}