Skip to content

Commit d7ee0e4

Browse files
authored
fix(swarm)!: make on_connection_handler_event impl mandatory. (#3364)
Sorry I missed this on #3264
1 parent dcfa7ec commit d7ee0e4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

swarm/CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
- Add `estblished_in` to `SwarmEvent::ConnectionEstablished`. See [PR 3134].
1010

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

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

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

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

25-
- Remove `ConnectionId::new`. Manually creating `ConnectionId`s is now unsupported. See [PR 3327].
26-
26+
[PR 3364]: https://github.com/libp2p/rust-libp2p/pull/3364
2727
[PR 3170]: https://github.com/libp2p/rust-libp2p/pull/3170
2828
[PR 3134]: https://github.com/libp2p/rust-libp2p/pull/3134
2929
[PR 3153]: https://github.com/libp2p/rust-libp2p/pull/3153

swarm/src/behaviour.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ pub trait NetworkBehaviour: 'static {
172172
_connection_id: ConnectionId,
173173
_event: <<Self::ConnectionHandler as IntoConnectionHandler>::Handler as
174174
ConnectionHandler>::OutEvent,
175-
) {
176-
}
175+
);
177176

178177
/// Polls for things that swarm should do.
179178
///

0 commit comments

Comments
 (0)