-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support listening both IPv4 and IPv6 + NodeRecord extension #178
Support listening both IPv4 and IPv6 + NodeRecord extension #178
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
this.channel = channel; | ||
final Publisher<NetworkParcel> outgoingStream, final List<NioDatagramChannel> channels) { | ||
this.ip4Channel = channels.stream().filter(channel -> !isChannelIPv6(channel)).findFirst(); | ||
this.ip6Channel = channels.stream().filter(this::isChannelIPv6).findFirst(); | ||
Flux.from(outgoingStream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we throw here if both are empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the design a bit. You can have a look.
src/main/java/org/ethereum/beacon/discovery/network/NettyDiscoveryServerImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
this.channel = channel; | ||
final Publisher<NetworkParcel> outgoingStream, | ||
final Map<InternetProtocolFamily, NioDatagramChannel> channels) { | ||
this.channels = channels; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add throw if channels is empty.
PR Description
IPv6
methods inNodeRecord
Change CircleCI to use machine executor instead of docker as per https://circleci.com/docs/faq/#ipv6-in-tests
Fixed Issue(s)
fixes #176