@@ -21,7 +21,7 @@ use futures::{pin_mut, FutureExt, Sink, SinkExt, StreamExt};
2121use libp2p:: gossipsub:: { SubscriptionError , TopicHash } ;
2222use libp2p:: identity:: Keypair ;
2323use libp2p:: swarm:: SwarmEvent ;
24- use libp2p:: { noise , yamux , Multiaddr , PeerId , StreamProtocol , Swarm , SwarmBuilder } ;
24+ use libp2p:: { Multiaddr , PeerId , StreamProtocol , Swarm , SwarmBuilder } ;
2525use metrics:: NetworkMetrics ;
2626use tracing:: { debug, error, trace, warn} ;
2727
@@ -728,8 +728,11 @@ impl NetworkManager {
728728 let mut swarm = SwarmBuilder :: with_existing_identity ( key_pair)
729729 . with_tokio ( )
730730 // TODO(AndrewL): .with_quic()
731- . with_tcp ( Default :: default ( ) , noise:: Config :: new, yamux:: Config :: default)
732- . expect ( "Error building TCP transport" )
731+ . with_quic_config ( |mut quic_config| {
732+ quic_config. max_stream_data = u32:: MAX ;
733+ quic_config. max_connection_data = u32:: MAX ;
734+ quic_config
735+ } )
733736 . with_dns ( )
734737 . expect ( "Error building DNS transport" )
735738 . with_behaviour ( |key| mixed_behaviour:: MixedBehaviour :: new (
@@ -747,9 +750,7 @@ impl NetworkManager {
747750 . with_swarm_config ( |cfg| cfg. with_idle_connection_timeout ( idle_connection_timeout) )
748751 . build ( ) ;
749752
750- swarm
751- . listen_on ( listen_address. clone ( ) )
752- . unwrap_or_else ( |_| panic ! ( "Error while binding to {listen_address}" ) ) ;
753+ let _ = swarm. listen_on ( listen_address. clone ( ) ) ;
753754
754755 let advertised_multiaddr = advertised_multiaddr. map ( |address| {
755756 address
0 commit comments