This repository has been archived by the owner on Oct 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 165
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this currently fails because the identify query is executed before network of swarm is ready, or is even polled the first time.
polling swarm first seems important, otherwise there'll be a race to first listening endpoint getting up at least.
dvc94ch
reviewed
Mar 22, 2020
koivunej
commented
Mar 22, 2020
Comment on lines
+436
to
+447
match inner { | ||
SwarmEvent::Behaviour(()) => {} | ||
SwarmEvent::Connected(_peer_id) => {} | ||
SwarmEvent::Disconnected(_peer_id) => {} | ||
SwarmEvent::NewListenAddr(_addr) => {} | ||
SwarmEvent::ExpiredListenAddr(_addr) => {} | ||
SwarmEvent::UnreachableAddr { | ||
peer_id: _peer_id, | ||
address: _address, | ||
error: _error, | ||
} => {} | ||
SwarmEvent::StartConnect(_peer_id) => {} |
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 see no harm in keeping this because it's easy to put dbg!(inner)
on line 436 here.
koivunej
commented
Mar 22, 2020
Comment on lines
+50
to
+58
match ipfs.connect(addr.clone()).await { | ||
Ok(_) => { | ||
connected = Some(addr); | ||
break; | ||
} | ||
Err(e) => { | ||
println!("Failed connecting to {}: {}", addr, e); | ||
} | ||
} |
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.
My initial thinking for the connect
was that it could be connect(PeerId, Vec<Multiaddr>)
as by the looks of libp2p it might dial through all of the addresses. This will probably change somehow in the next version of libp2p because the multiple connections to a peer was merged libp2p/rust-libp2p#1440 and libp2p/rust-libp2p#1493.
dvc94ch
approved these changes
Mar 22, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The test case hangs for unknown reason.The test hung initially because a pending
NetworkBehaviourAction
was placed in the queue to be popped on next poll but the waker was never notified that poll needed to be called again.