@@ -23,6 +23,7 @@ import io.libp2p.security.tls.Libp2pTrustManager
23
23
import io.libp2p.security.tls.buildCert
24
24
import io.libp2p.security.tls.getJavaKey
25
25
import io.libp2p.security.tls.getPublicKeyFromCert
26
+ import io.libp2p.security.tls.verifyAndExtractPeerId
26
27
import io.libp2p.transport.implementation.ConnectionOverNetty
27
28
import io.libp2p.transport.implementation.NettyTransport
28
29
import io.libp2p.transport.implementation.StreamOverNetty
@@ -173,7 +174,7 @@ class QuicTransport(
173
174
listeners - = addr
174
175
}
175
176
}
176
- logger.info(" Quic server listening on $addr " )
177
+ logger.info(" Quic server listening on {} " , addr )
177
178
res.complete(null )
178
179
}
179
180
}
@@ -293,7 +294,7 @@ class QuicTransport(
293
294
val javaPrivateKey = getJavaKey(connectionKeys.first)
294
295
val isClient = expectedRemotePeerId != null
295
296
val cert = buildCert(localKey, connectionKeys.first)
296
- log .info(" Building {} keys and cert for peerid {}" , certAlgorithm, PeerId .fromPubKey(localKey.publicKey()))
297
+ logger .info(" Building {} keys and cert for peer {}" , certAlgorithm, PeerId .fromPubKey(localKey.publicKey()))
297
298
return (
298
299
if (isClient) {
299
300
QuicSslContextBuilder .forClient().keyManager(javaPrivateKey, null , cert)
@@ -334,7 +335,7 @@ class QuicTransport(
334
335
val remotePeerId = verifyAndExtractPeerId(arrayOf(remoteCert))
335
336
val remotePublicKey = getPublicKeyFromCert(arrayOf(remoteCert))
336
337
337
- log .info(" Handshake completed with remote peer id: {}" , remotePeerId)
338
+ logger .info(" Handshake completed with remote peer id: {}" , remotePeerId)
338
339
339
340
connection.setSecureSession(
340
341
SecureChannel .Session (
@@ -362,7 +363,7 @@ class QuicTransport(
362
363
363
364
@Deprecated(" Deprecated in Java" )
364
365
override fun exceptionCaught (ctx : ChannelHandlerContext , cause : Throwable ) {
365
- log .error(" An error during handshake" , cause)
366
+ logger .error(" An error during handshake" , cause)
366
367
ctx.close()
367
368
}
368
369
}
@@ -382,8 +383,8 @@ class QuicTransport(
382
383
val connection : ConnectionOverNetty
383
384
) : StreamMuxer.Session {
384
385
override fun <T > createStream (protocols : List <ProtocolBinding <T >>): StreamPromise <T > {
385
- var multistreamProtocol: MultistreamProtocol = MultistreamProtocolV1
386
- var streamMultistreamProtocol: MultistreamProtocol by lazyVar { multistreamProtocol }
386
+ val multistreamProtocol: MultistreamProtocol = MultistreamProtocolV1
387
+ val streamMultistreamProtocol: MultistreamProtocol by lazyVar { multistreamProtocol }
387
388
val multi = streamMultistreamProtocol.createMultistream(protocols)
388
389
389
390
val controller = CompletableFuture <T >()
0 commit comments