Skip to content

Conversation

@tomaka
Copy link
Member

@tomaka tomaka commented Mar 25, 2020

Adds new variants and improves the existing variants of the SwarmEvent in order to report everything that happens in the swarm in terms of connectivity.

This way, the outside can track exactly what happens.

Some notes:

  • Reporting the errors enums (rather than opaque Box<Error>s) is going to be quite helpful in Substrate to detect connections closed because they were idle, and dial failures because of peer id mismatch.

  • I changed some usizes into u32s. In general, usize should only be used for things that depend on the platform's pointer width.

  • I purposefully left aside the concept of "external addresses", as the way we handle them is still quite blurry at the moment.

@tomaka tomaka requested a review from romanb March 25, 2020 09:40
tomaka and others added 2 commits March 25, 2020 13:06
Co-Authored-By: Roman Borschel <romanb@users.noreply.github.com>
Copy link
Contributor

@romanb romanb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also #1519.

@tomaka tomaka merged commit 7220877 into libp2p:master Mar 26, 2020
@tomaka tomaka deleted the better-swarm-events branch March 26, 2020 17:02
folex added a commit to fluencelabs/rust-libp2p that referenced this pull request Mar 30, 2020
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 this pull request may close these issues.

2 participants