Skip to content

Commit

Permalink
Bump swarm & add CHANGELOG entry; fix NewExternalAddrOfPeer docs
Browse files Browse the repository at this point in the history
  • Loading branch information
StemCll committed Sep 23, 2023
1 parent c883a5b commit 6534f13
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ libp2p-rendezvous = { version = "0.13.0", path = "protocols/rendezvous" }
libp2p-upnp = { version = "0.1.0", path = "protocols/upnp" }
libp2p-request-response = { version = "0.25.1", path = "protocols/request-response" }
libp2p-server = { version = "0.12.3", path = "misc/server" }
libp2p-swarm = { version = "0.43.4", path = "swarm" }
libp2p-swarm = { version = "0.44.0", path = "swarm" }
libp2p-swarm-derive = { version = "0.34.0", path = "swarm-derive" }
libp2p-swarm-test = { version = "0.2.0", path = "swarm-test" }
libp2p-tcp = { version = "0.40.0", path = "transports/tcp" }
Expand Down
6 changes: 6 additions & 0 deletions swarm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.44.0

- Add `FromSwarm::NewExternalAddrOfPeer` event.

[PR 4371]: https://github.com/libp2p/rust-libp2p/pull/4371

## 0.43.4

- Implement `Debug` for event structs.
Expand Down
2 changes: 1 addition & 1 deletion swarm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-swarm"
edition = "2021"
rust-version = { workspace = true }
description = "The libp2p swarm"
version = "0.43.4"
version = "0.44.0"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down
7 changes: 3 additions & 4 deletions swarm/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,7 @@ pub enum ToSwarm<TOutEvent, TInEvent> {
connection: CloseConnection,
},

/// TODO: more documentation needed
/// Reports external address of a remote peer to other `NetworkBehaviours`
/// Reports external address of a remote peer to other [`NetworkBehaviours`].

Check failure on line 324 in swarm/src/behaviour.rs

View workflow job for this annotation

GitHub Actions / Check rustdoc intra-doc links

unresolved link to `NetworkBehaviours`
NewExternalAddrOfPeer { peer_id: PeerId, addr: Multiaddr },
}

Expand Down Expand Up @@ -458,7 +457,7 @@ pub enum FromSwarm<'a, Handler> {
ExternalAddrConfirmed(ExternalAddrConfirmed<'a>),
/// Informs the behaviour that an external address of the local node expired, i.e. is no-longer confirmed.
ExternalAddrExpired(ExternalAddrExpired<'a>),
/// TODO: document it
/// Informs the behaviour that we have discovered a new external address for a remote peer.
NewExternalAddrOfPeer(NewExternalAddrOfPeer<'a>),
}

Expand Down Expand Up @@ -573,7 +572,7 @@ pub struct ExternalAddrExpired<'a> {
pub addr: &'a Multiaddr,
}

/// [`FromSwarm`] variant that informs the behaviour that a new external address was detected.
/// [`FromSwarm`] variant that informs the behaviour that a new external address for a remote peer was detected.
#[derive(Clone, Copy, Debug)]
pub struct NewExternalAddrOfPeer<'a> {
pub peer_id: &'a PeerId,
Expand Down

0 comments on commit 6534f13

Please sign in to comment.