Replies: 1 comment 2 replies
-
I don't know why it doesn't add the address, maybe @thomaseizinger will know. However it will add them when #5313 is implemented, but with a different event - Another thing about your code: If I'm not mistaken you shouldn't remove addresses on |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using Kademlia with mDNS, when peers are found I get a
Discovered remote peer
log message printed, and the Kademlia DHT gets shared with this new peer. However when I manually dial a peer which is not discoverable with mDNS usingswarm.dial(...)
, the DHT isn't shared with this new peer and I need to manually callkad::Behaviour::add_address
onSwarmEvent::ConnectionEstablished
events.Why must I call
kad::Behaviour::add_address
manually when dialing a peer, but not when mDNS auto discovers peers?The event handling I had to add to fix this Kademlia dial issues is:
I also want to check is code I added correct? My
Behaviour
struct includes:I'm not sure if I need to call add_address on any of these other behaviours or if its just Kademlia that needs special handling.
This looks related: #3877
Beta Was this translation helpful? Give feedback.
All reactions