File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 11
11
- Don't close entire connection upon ` DialUpgradeError ` s within ` OneShotHandler ` .
12
12
Instead, the error is reported as ` Err(e) ` via ` ConnectionHandler::ToBehaviour ` .
13
13
See [ PR 4715] ( https://github.com/libp2p/rust-libp2p/pull/4715 ) .
14
+ - Log ` PeerId ` of ` Swarm ` even when constructed with new ` SwarmBuilder ` .
15
+ See [ PR 4671] ( https://github.com/libp2p/rust-libp2p/pull/4671 ) .
14
16
15
17
## 0.43.6
16
18
Original file line number Diff line number Diff line change @@ -366,6 +366,8 @@ where
366
366
local_peer_id : PeerId ,
367
367
config : Config ,
368
368
) -> Self {
369
+ log:: info!( "Local peer id: {local_peer_id}" ) ;
370
+
369
371
Swarm {
370
372
local_peer_id,
371
373
transport,
@@ -1656,17 +1658,14 @@ where
1656
1658
1657
1659
/// Builds a `Swarm` with the current configuration.
1658
1660
pub fn build ( self ) -> Swarm < TBehaviour > {
1659
- log:: info!( "Local peer id: {}" , self . local_peer_id) ;
1660
- Swarm {
1661
- local_peer_id : self . local_peer_id ,
1662
- transport : self . transport ,
1663
- pool : Pool :: new ( self . local_peer_id , self . pool_config ) ,
1664
- behaviour : self . behaviour ,
1665
- supported_protocols : Default :: default ( ) ,
1666
- confirmed_external_addr : Default :: default ( ) ,
1667
- listened_addrs : HashMap :: new ( ) ,
1668
- pending_event : None ,
1669
- }
1661
+ Swarm :: new (
1662
+ self . transport ,
1663
+ self . behaviour ,
1664
+ self . local_peer_id ,
1665
+ Config {
1666
+ pool_config : self . pool_config ,
1667
+ } ,
1668
+ )
1670
1669
}
1671
1670
}
1672
1671
You can’t perform that action at this time.
0 commit comments