Skip to content
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

Update Kademlia NetworkBehaviour in Rust Peer #25

Closed
maschad opened this issue Apr 6, 2023 · 0 comments · Fixed by #27
Closed

Update Kademlia NetworkBehaviour in Rust Peer #25

maschad opened this issue Apr 6, 2023 · 0 comments · Fixed by #27

Comments

@maschad
Copy link
Member

maschad commented Apr 6, 2023

Note that adding the Kademlia NetworkBehaviour in itself is not quite enough. You would (a) need to execute the bootstrap method regularly and (b) actively add peers (like you do, commented out, for the bootstrap nodes).

You can find an example here:

(a) https://github.com/mxinden/rust-libp2p-server/blob/4d887c720bf25ad282c58d8f7d9773715a2b5c70/src/main.rs#L162-L169

(b) https://github.com/mxinden/rust-libp2p-server/blob/4d887c720bf25ad282c58d8f7d9773715a2b5c70/src/main.rs#L172-L199

The latter will be automated once we have libp2p/rust-libp2p#2680.

Originally posted by @mxinden in #17 (comment)

@maschad maschad changed the title Note that adding the Kademlia NetworkBehaviour in itself is not quite enough. You would (a) need to execute the bootstrap method regularly and (b) actively add peers (like you do, commented out, for the bootstrap nodes). Update Kademlia NetworkBehaviour in Rust Peer Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant