Skip to content

Commit

Permalink
fix(swarm)!: make on_connection_handler_event impl mandatory. (#3364)
Browse files Browse the repository at this point in the history
Sorry I missed this on #3264
  • Loading branch information
jxs authored Jan 24, 2023
1 parent dcfa7ec commit d7ee0e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions swarm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
- Add `estblished_in` to `SwarmEvent::ConnectionEstablished`. See [PR 3134].

- Remove deprecated `inject_*` methods from `NetworkBehaviour` and `ConnectionHandler`.
see [PR 3264].
Make the implementation of `on_swarm_event` and `on_connection_handler_event`
both mandatory. See [PR 3264] and [PR 3364].

- Update to `libp2p-swarm-derive` `v0.32.0`.

- Remove type parameter from `PendingOutboundConnectionError` and `PendingInboundConnectionError`.
These two types are always used with `std::io::Error`. See [PR 3272].

- Replace `SwarmBuilder::connection_event_buffer_size` with `SwarmBuilder::per_connection_event_buffer_size` .
- Replace `SwarmBuilder::connection_event_buffer_size` with `SwarmBuilder::per_connection_event_buffer_size` .
The configured value now applies _per_ connection.
The default values remains 7.
If you have previously set `connection_event_buffer_size` you should re-evaluate what a good size for a _per connection_ buffer is.
See [PR 3188].

- Remove `ConnectionId::new`. Manually creating `ConnectionId`s is now unsupported. See [PR 3327].

[PR 3364]: https://github.com/libp2p/rust-libp2p/pull/3364
[PR 3170]: https://github.com/libp2p/rust-libp2p/pull/3170
[PR 3134]: https://github.com/libp2p/rust-libp2p/pull/3134
[PR 3153]: https://github.com/libp2p/rust-libp2p/pull/3153
Expand Down
3 changes: 1 addition & 2 deletions swarm/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ pub trait NetworkBehaviour: 'static {
_connection_id: ConnectionId,
_event: <<Self::ConnectionHandler as IntoConnectionHandler>::Handler as
ConnectionHandler>::OutEvent,
) {
}
);

/// Polls for things that swarm should do.
///
Expand Down

0 comments on commit d7ee0e4

Please sign in to comment.