-
Notifications
You must be signed in to change notification settings - Fork 20.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc: avoid use of cgo by hard-coding maxPathSize #27447
Conversation
If you want to get values per |
Hmm, we already have a version of this file without cgo, |
@fjl But document said:
EDIT: I misunderstood but no need for |
ah, I'm misunderstood. Fix later |
@fjl PTAL. |
Sorry, I don't understand. I am not familiar with |
This PR removes the dependency on cgo by generating the If the dependency on cgo is a problem, we could also just remove the The impact of a wrong constant value will be very low because it is only used for printing a warning message. |
5ca575e
to
d375525
Compare
@fjl |
@fjl Thanks! |
### Description replacing `rpc` module with the upstream version ### Changes Focus PR: * ethereum/go-ethereum#26681 * ethereum/go-ethereum#27447 --------- Co-authored-by: Brandon Liu <[email protected]> Co-authored-by: Adrian Sutton <[email protected]>
Package rpc uses cgo to find the maximum UNIX domain socket path length. If exceeded, a warning is printed. This is the only use of cgo in this package. It seems excessive to depend on cgo just for this warning, so we now hard-code the usual limit for Linux instead. --------- Co-authored-by: Felix Lange <[email protected]>
)" This reverts commit 63eb2e9.
)" This reverts commit 63eb2e9.
Avoid using
cgo
withgo tool cgo -godefs
.Generated by:
$ docker container run --rm -it --entrypoint=sh -v $PWD:/go/src/github.com/ethereum/go-ethereum -w /go/src/github.com/ethereum/go-ethereum golang:bullseye -c 'make godef'