@@ -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
@@ -724,8 +724,11 @@ impl NetworkManager {
724724 let mut swarm = SwarmBuilder :: with_existing_identity ( key_pair)
725725 . with_tokio ( )
726726 // TODO(AndrewL): .with_quic()
727- . with_tcp ( Default :: default ( ) , noise:: Config :: new, yamux:: Config :: default)
728- . expect ( "Error building TCP transport" )
727+ . with_quic_config ( |mut quic_config| {
728+ quic_config. max_stream_data = u32:: MAX ;
729+ quic_config. max_connection_data = u32:: MAX ;
730+ quic_config
731+ } )
729732 . with_dns ( )
730733 . expect ( "Error building DNS transport" )
731734 . with_behaviour ( |key| mixed_behaviour:: MixedBehaviour :: new (
@@ -743,9 +746,7 @@ impl NetworkManager {
743746 . with_swarm_config ( |cfg| cfg. with_idle_connection_timeout ( idle_connection_timeout) )
744747 . build ( ) ;
745748
746- swarm
747- . listen_on ( listen_address. clone ( ) )
748- . unwrap_or_else ( |_| panic ! ( "Error while binding to {listen_address}" ) ) ;
749+ let _ = swarm. listen_on ( listen_address. clone ( ) ) ;
749750
750751 let advertised_multiaddr = advertised_multiaddr. map ( |address| {
751752 address
0 commit comments