diff --git a/libp2p/builders.nim b/libp2p/builders.nim index 2d38c7d..7132082 100644 --- a/libp2p/builders.nim +++ b/libp2p/builders.nim @@ -227,7 +227,7 @@ proc build*(b: SwitchBuilder): Switch identify = Identify.new(peerInfo, b.sendSignedPeerRecord) connManager = ConnManager.new(b.maxConnsPerPeer, b.maxConnections, b.maxIn, b.maxOut) ms = MultistreamSelect.new() - muxedUpgrade = MuxedUpgrade.new(b.muxers, secureManagerInstances, connManager, ms) + muxedUpgrade = MuxedUpgrade.new(b.muxers, secureManagerInstances, ms) let transports = block: diff --git a/libp2p/upgrademngrs/muxedupgrade.nim b/libp2p/upgrademngrs/muxedupgrade.nim index eb428ec..05d751c 100644 --- a/libp2p/upgrademngrs/muxedupgrade.nim +++ b/libp2p/upgrademngrs/muxedupgrade.nim @@ -91,13 +91,11 @@ proc new*( T: type MuxedUpgrade, muxers: seq[MuxerProvider], secureManagers: openArray[Secure] = [], - connManager: ConnManager, ms: MultistreamSelect): T = let upgrader = T( muxers: muxers, secureManagers: @secureManagers, - connManager: connManager, ms: ms) upgrader.streamHandler = proc(conn: Connection) diff --git a/libp2p/upgrademngrs/upgrade.nim b/libp2p/upgrademngrs/upgrade.nim index 005a2a9..49e70a9 100644 --- a/libp2p/upgrademngrs/upgrade.nim +++ b/libp2p/upgrademngrs/upgrade.nim @@ -35,7 +35,6 @@ type Upgrade* = ref object of RootObj ms*: MultistreamSelect - connManager*: ConnManager secureManagers*: seq[Secure] method upgrade*( diff --git a/tests/testnoise.nim b/tests/testnoise.nim index d873ecb..f598b42 100644 --- a/tests/testnoise.nim +++ b/tests/testnoise.nim @@ -72,7 +72,7 @@ proc createSwitch(ma: MultiAddress; outgoing: bool, secio: bool = false): (Switc [Secure(Noise.new(rng, privateKey, outgoing = outgoing))] connManager = ConnManager.new() ms = MultistreamSelect.new() - muxedUpgrade = MuxedUpgrade.new(muxers, secureManagers, connManager, ms) + muxedUpgrade = MuxedUpgrade.new(muxers, secureManagers, ms) transports = @[Transport(TcpTransport.new(upgrade = muxedUpgrade))] let switch = newSwitch(