-
Notifications
You must be signed in to change notification settings - Fork 49
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
libp2p 0.48 #111
libp2p 0.48 #111
Conversation
not updating the explicit dependency on multihash meant that 0.16.1 was used without the `blake3` feature, breaking the tests
void = "1.0.2" | ||
|
||
[dependencies.libp2p] | ||
version = "0.43.0" | ||
version = "0.48.0" | ||
default-features = false | ||
features = [ |
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.
You might want to enable "rsa" feature since that was moved into its own feature (libp2p/rust-libp2p#2860) otherwise you might run into errors if you use libp2p bootstrap or dialing any rsa keys (libp2p/rust-libp2p#2971). If its not needed, could also move it into a optional feature too.
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.
Thanks for catching this! An optional feature looks like the idiomatic way to go.
|
||
for addr in config.listen_on { | ||
let _ = ipfs.listen_on(addr)?; | ||
let _ = ipfs.listen_on(addr); |
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.
Now that listen failure is asynchronous, perhaps include the notification in SwarmEvents.
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.
leaving this for a later time
This is a bigger update because libp2p removed NetworkBehaviourEventProcess, which means that all state needs to move out of the Behaviour and into the place that calls
poll
.As I was touching this code anyway, I removed the mutex-based swarm access and fully encapsulated the Swarm in its own task, making all external requests asynchronous (and also
'static
, i.e. owned data, so that they can travel through channels).The result is that some tests broke because they had previously relied upon scheduling artifacts caused by the mutex approach.