fix(swarm)!: make on_connection_handler_event impl mandatory. (#3364)

Sorry I missed this on https://github.com/libp2p/rust-libp2p/pull/3264
This commit is contained in:
João Oliveira
2023-01-24 01:10:26 +00:00
committed by GitHub
parent dcfa7ecf5d
commit d7ee0e4d35
2 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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.
///