From 78a0024e00c3c32e2ad0a3a9b9a3ca00665f5304 Mon Sep 17 00:00:00 2001 From: Patrick Kuo Date: Thu, 30 Mar 2017 10:00:46 +0100 Subject: [PATCH] Fix various deprecated warnings * Changed deprecated kotlin.reflect.primaryConstructor to kotlin.reflect.full.primaryConstructor * Changed deprecated kotlin.reflect.memberProperties to kotlin.reflect.full.memberProperties * Changed deprecated kotlin.reflect.declaredMemberProperties to kotlin.reflect.full.declaredMemberProperties * Changed deprecated AllComposition to AllOf * Changed deprecated AnyComposition to AnyOf * Changed deprecated kotlin.reflect.KotlinReflectionInternalError to kotlin.reflect.jvm.internal.KotlinReflectionInternalError * Changed deprecated HostAndPort.hostText to HostAndPort.host * Removed duplicated method net.corda.core.node.recordTransactions --- .../kotlin/net/corda/jackson/StringToMethodCallParser.kt | 2 +- .../src/main/kotlin/net/corda/core/flows/FlowLogicRef.kt | 2 +- core/src/main/kotlin/net/corda/core/node/ServiceHub.kt | 8 -------- .../src/main/kotlin/net/corda/core/serialization/Kryo.kt | 9 +++++++-- .../net/corda/flows/AbstractStateReplacementFlow.kt | 1 - core/src/main/kotlin/net/corda/flows/TwoPartyDealFlow.kt | 1 - .../net/corda/core/flows/ContractUpgradeFlowTest.kt | 8 ++++---- .../net/corda/core/flows/ResolveTransactionsFlowTest.kt | 1 - .../src/test/kotlin/net/corda/docs/ExampleConfigTest.kt | 2 +- .../kotlin/net/corda/contracts/testing/VaultFiller.kt | 1 - .../kotlin/net/corda/contracts/CommercialPaperTests.kt | 4 ---- .../main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt | 2 +- node/src/main/kotlin/net/corda/node/driver/Driver.kt | 4 ++-- node/src/main/kotlin/net/corda/node/internal/Node.kt | 2 +- .../node/services/messaging/ArtemisMessagingServer.kt | 2 +- .../node/services/transactions/RaftUniquenessProvider.kt | 4 ++-- .../corda/node/services/DistributedImmutableMapTests.kt | 4 ++-- .../net/corda/node/services/NodeSchedulerServiceTest.kt | 1 - .../net/corda/node/visualiser/GroupToGraphConversion.kt | 2 +- .../src/main/kotlin/net/corda/irs/contract/IRS.kt | 4 ++-- .../main/kotlin/net/corda/simulation/TradeSimulation.kt | 1 - .../main/kotlin/net/corda/loadtest/ConnectionManager.kt | 2 +- 22 files changed, 27 insertions(+), 40 deletions(-) diff --git a/client/jackson/src/main/kotlin/net/corda/jackson/StringToMethodCallParser.kt b/client/jackson/src/main/kotlin/net/corda/jackson/StringToMethodCallParser.kt index 7ef42412e1..fe268e83f4 100644 --- a/client/jackson/src/main/kotlin/net/corda/jackson/StringToMethodCallParser.kt +++ b/client/jackson/src/main/kotlin/net/corda/jackson/StringToMethodCallParser.kt @@ -13,7 +13,7 @@ import java.util.concurrent.Callable import javax.annotation.concurrent.ThreadSafe import kotlin.reflect.KClass import kotlin.reflect.KFunction -import kotlin.reflect.KotlinReflectionInternalError +import kotlin.reflect.jvm.internal.KotlinReflectionInternalError import kotlin.reflect.jvm.kotlinFunction /** diff --git a/core/src/main/kotlin/net/corda/core/flows/FlowLogicRef.kt b/core/src/main/kotlin/net/corda/core/flows/FlowLogicRef.kt index e4757b611f..208f2a8131 100644 --- a/core/src/main/kotlin/net/corda/core/flows/FlowLogicRef.kt +++ b/core/src/main/kotlin/net/corda/core/flows/FlowLogicRef.kt @@ -9,9 +9,9 @@ import java.lang.reflect.Type import java.util.* import kotlin.reflect.KFunction import kotlin.reflect.KParameter +import kotlin.reflect.full.primaryConstructor import kotlin.reflect.jvm.javaConstructor import kotlin.reflect.jvm.javaType -import kotlin.reflect.primaryConstructor /** * A class for conversion to and from [FlowLogic] and [FlowLogicRef] instances. diff --git a/core/src/main/kotlin/net/corda/core/node/ServiceHub.kt b/core/src/main/kotlin/net/corda/core/node/ServiceHub.kt index 1c7f5ddb18..4f315ab6bd 100644 --- a/core/src/main/kotlin/net/corda/core/node/ServiceHub.kt +++ b/core/src/main/kotlin/net/corda/core/node/ServiceHub.kt @@ -112,11 +112,3 @@ interface ServiceHub : ServicesForResolution { */ val notaryIdentityKey: KeyPair get() = this.keyManagementService.toKeyPair(this.myInfo.notaryIdentity.owningKey.keys) } - -/** - * Given some [SignedTransaction]s, writes them to the local storage for validated transactions and then - * sends them to the vault for further processing. - * - * @param txs The transactions to record. - */ -fun ServiceHub.recordTransactions(vararg txs: SignedTransaction) = recordTransactions(txs.toList()) diff --git a/core/src/main/kotlin/net/corda/core/serialization/Kryo.kt b/core/src/main/kotlin/net/corda/core/serialization/Kryo.kt index ef93e233d9..bb546e90a0 100644 --- a/core/src/main/kotlin/net/corda/core/serialization/Kryo.kt +++ b/core/src/main/kotlin/net/corda/core/serialization/Kryo.kt @@ -27,7 +27,11 @@ import java.security.spec.InvalidKeySpecException import java.time.Instant import java.util.* import javax.annotation.concurrent.ThreadSafe -import kotlin.reflect.* +import kotlin.reflect.KClass +import kotlin.reflect.KMutableProperty +import kotlin.reflect.KParameter +import kotlin.reflect.full.memberProperties +import kotlin.reflect.full.primaryConstructor import kotlin.reflect.jvm.javaType /** @@ -64,6 +68,7 @@ import kotlin.reflect.jvm.javaType // A convenient instance of Kryo pre-configured with some useful things. Used as a default by various functions. fun p2PKryo(): KryoPool = kryoPool + // Same again, but this has whitelisting turned off for internal storage use only. fun storageKryo(): KryoPool = internalKryoPool @@ -392,7 +397,7 @@ object CompositeKeyNodeSerializer : Serializer() { val weights = input.readInts(childCount) val builder = CompositeKey.Builder() - weights.zip(children).forEach { builder.addKey(it.second, it.first) } + weights.zip(children).forEach { builder.addKey(it.second, it.first) } return builder.build(threshold) } } diff --git a/core/src/main/kotlin/net/corda/flows/AbstractStateReplacementFlow.kt b/core/src/main/kotlin/net/corda/flows/AbstractStateReplacementFlow.kt index a4412bf88f..16c96c10a9 100644 --- a/core/src/main/kotlin/net/corda/flows/AbstractStateReplacementFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/AbstractStateReplacementFlow.kt @@ -10,7 +10,6 @@ import net.corda.core.crypto.Party import net.corda.core.crypto.signWithECDSA import net.corda.core.flows.FlowException import net.corda.core.flows.FlowLogic -import net.corda.core.node.recordTransactions import net.corda.core.serialization.CordaSerializable import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.WireTransaction diff --git a/core/src/main/kotlin/net/corda/flows/TwoPartyDealFlow.kt b/core/src/main/kotlin/net/corda/flows/TwoPartyDealFlow.kt index 886b1d1f21..4ca7be0ca8 100644 --- a/core/src/main/kotlin/net/corda/flows/TwoPartyDealFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/TwoPartyDealFlow.kt @@ -7,7 +7,6 @@ import net.corda.core.contracts.StateRef import net.corda.core.crypto.* import net.corda.core.flows.FlowLogic import net.corda.core.node.NodeInfo -import net.corda.core.node.recordTransactions import net.corda.core.node.services.ServiceType import net.corda.core.seconds import net.corda.core.serialization.CordaSerializable diff --git a/core/src/test/kotlin/net/corda/core/flows/ContractUpgradeFlowTest.kt b/core/src/test/kotlin/net/corda/core/flows/ContractUpgradeFlowTest.kt index 90b825c5c5..735dd7bff9 100644 --- a/core/src/test/kotlin/net/corda/core/flows/ContractUpgradeFlowTest.kt +++ b/core/src/test/kotlin/net/corda/core/flows/ContractUpgradeFlowTest.kt @@ -143,16 +143,16 @@ class ContractUpgradeFlowTest { val result = resultFuture.get() // Check results. listOf(a, b).forEach { - val stx = databaseTransaction(a.database) { a.services.storageService.validatedTransactions.getTransaction(result.ref.txhash) } - requireNotNull(stx) + val signedTX = databaseTransaction(a.database) { a.services.storageService.validatedTransactions.getTransaction(result.ref.txhash) } + requireNotNull(signedTX) // Verify inputs. - val input = databaseTransaction(a.database) { a.services.storageService.validatedTransactions.getTransaction(stx!!.tx.inputs.single().txhash) } + val input = databaseTransaction(a.database) { a.services.storageService.validatedTransactions.getTransaction(signedTX!!.tx.inputs.single().txhash) } requireNotNull(input) assertTrue(input!!.tx.outputs.single().data is DummyContract.State) // Verify outputs. - assertTrue(stx!!.tx.outputs.single().data is DummyContractV2.State) + assertTrue(signedTX!!.tx.outputs.single().data is DummyContractV2.State) } } diff --git a/core/src/test/kotlin/net/corda/core/flows/ResolveTransactionsFlowTest.kt b/core/src/test/kotlin/net/corda/core/flows/ResolveTransactionsFlowTest.kt index f74a52e52c..fa508597e1 100644 --- a/core/src/test/kotlin/net/corda/core/flows/ResolveTransactionsFlowTest.kt +++ b/core/src/test/kotlin/net/corda/core/flows/ResolveTransactionsFlowTest.kt @@ -5,7 +5,6 @@ import net.corda.core.crypto.NullSignature import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.getOrThrow -import net.corda.core.node.recordTransactions import net.corda.core.serialization.opaque import net.corda.core.transactions.SignedTransaction import net.corda.core.utilities.DUMMY_NOTARY_KEY diff --git a/docs/source/example-code/src/test/kotlin/net/corda/docs/ExampleConfigTest.kt b/docs/source/example-code/src/test/kotlin/net/corda/docs/ExampleConfigTest.kt index 33b0698ecd..a0c3c3d785 100644 --- a/docs/source/example-code/src/test/kotlin/net/corda/docs/ExampleConfigTest.kt +++ b/docs/source/example-code/src/test/kotlin/net/corda/docs/ExampleConfigTest.kt @@ -6,7 +6,7 @@ import net.corda.verifier.Verifier import org.junit.Test import java.nio.file.Path import java.nio.file.Paths -import kotlin.reflect.declaredMemberProperties +import kotlin.reflect.full.declaredMemberProperties class ExampleConfigTest { diff --git a/finance/src/main/kotlin/net/corda/contracts/testing/VaultFiller.kt b/finance/src/main/kotlin/net/corda/contracts/testing/VaultFiller.kt index ae2e9c097e..978e0e1f87 100644 --- a/finance/src/main/kotlin/net/corda/contracts/testing/VaultFiller.kt +++ b/finance/src/main/kotlin/net/corda/contracts/testing/VaultFiller.kt @@ -13,7 +13,6 @@ import net.corda.core.crypto.CompositeKey import net.corda.core.crypto.Party import net.corda.core.crypto.composite import net.corda.core.node.ServiceHub -import net.corda.core.node.recordTransactions import net.corda.core.node.services.Vault import net.corda.core.serialization.OpaqueBytes import net.corda.core.transactions.SignedTransaction diff --git a/finance/src/test/kotlin/net/corda/contracts/CommercialPaperTests.kt b/finance/src/test/kotlin/net/corda/contracts/CommercialPaperTests.kt index 6e8b14fb20..9ce9d08273 100644 --- a/finance/src/test/kotlin/net/corda/contracts/CommercialPaperTests.kt +++ b/finance/src/test/kotlin/net/corda/contracts/CommercialPaperTests.kt @@ -7,7 +7,6 @@ import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.crypto.composite import net.corda.core.days -import net.corda.core.node.recordTransactions import net.corda.core.node.services.Vault import net.corda.core.node.services.VaultService import net.corda.core.seconds @@ -17,9 +16,6 @@ import net.corda.core.utilities.DUMMY_NOTARY import net.corda.core.utilities.DUMMY_NOTARY_KEY import net.corda.core.utilities.DUMMY_PUBKEY_1 import net.corda.core.utilities.TEST_TX_TIME -import net.corda.node.services.schema.HibernateObserver -import net.corda.node.services.schema.NodeSchemaService -import net.corda.node.services.vault.NodeVaultService import net.corda.node.utilities.configureDatabase import net.corda.node.utilities.databaseTransaction import net.corda.testing.* diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt b/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt index 83b7157238..8dbb3ddbca 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt @@ -41,7 +41,7 @@ class ArtemisTcpTransport { ): TransportConfiguration { val options = mutableMapOf( // Basic TCP target details - TransportConstants.HOST_PROP_NAME to hostAndPort.hostText, + TransportConstants.HOST_PROP_NAME to hostAndPort.host, TransportConstants.PORT_PROP_NAME to hostAndPort.port, // Turn on AMQP support, which needs the protocol jar on the classpath. diff --git a/node/src/main/kotlin/net/corda/node/driver/Driver.kt b/node/src/main/kotlin/net/corda/node/driver/Driver.kt index 1a13a698bf..8afb1e93e2 100644 --- a/node/src/main/kotlin/net/corda/node/driver/Driver.kt +++ b/node/src/main/kotlin/net/corda/node/driver/Driver.kt @@ -232,7 +232,7 @@ fun getTimestampAsDirectoryName(): String { fun addressMustBeBound(executorService: ScheduledExecutorService, hostAndPort: HostAndPort): ListenableFuture { return poll(executorService, "address $hostAndPort to bind") { try { - Socket(hostAndPort.hostText, hostAndPort.port).close() + Socket(hostAndPort.host, hostAndPort.port).close() Unit } catch (_exception: SocketException) { null @@ -243,7 +243,7 @@ fun addressMustBeBound(executorService: ScheduledExecutorService, hostAndPort: H fun addressMustNotBeBound(executorService: ScheduledExecutorService, hostAndPort: HostAndPort): ListenableFuture { return poll(executorService, "address $hostAndPort to unbind") { try { - Socket(hostAndPort.hostText, hostAndPort.port).close() + Socket(hostAndPort.host, hostAndPort.port).close() null } catch (_exception: SocketException) { Unit diff --git a/node/src/main/kotlin/net/corda/node/internal/Node.kt b/node/src/main/kotlin/net/corda/node/internal/Node.kt index dd83d96628..b69063ff4d 100644 --- a/node/src/main/kotlin/net/corda/node/internal/Node.kt +++ b/node/src/main/kotlin/net/corda/node/internal/Node.kt @@ -143,7 +143,7 @@ class Node(override val configuration: FullNodeConfiguration, private fun makeLocalMessageBroker(): HostAndPort { with(configuration) { - val useHost = tryDetectIfNotPublicHost(p2pAddress.hostText) + val useHost = tryDetectIfNotPublicHost(p2pAddress.host) val useAddress = useHost?.let { HostAndPort.fromParts(it, p2pAddress.port) } ?: p2pAddress messageBroker = ArtemisMessagingServer(this, useAddress, rpcAddress, services.networkMapCache, userService) return useAddress diff --git a/node/src/main/kotlin/net/corda/node/services/messaging/ArtemisMessagingServer.kt b/node/src/main/kotlin/net/corda/node/services/messaging/ArtemisMessagingServer.kt index 2a414374ea..120fb44a4e 100644 --- a/node/src/main/kotlin/net/corda/node/services/messaging/ArtemisMessagingServer.kt +++ b/node/src/main/kotlin/net/corda/node/services/messaging/ArtemisMessagingServer.kt @@ -355,7 +355,7 @@ class ArtemisMessagingServer(override val config: NodeConfiguration, connectorFactoryClassName = VerifyingNettyConnectorFactory::class.java.name, expectedCommonName = legalName ) - val tcpTransport = createTcpTransport(connectionDirection, target.hostText, target.port) + val tcpTransport = createTcpTransport(connectionDirection, target.host, target.port) tcpTransport.params[ArtemisMessagingServer::class.java.name] = this // We intentionally overwrite any previous connector config in case the peer legal name changed activeMQServer.configuration.addConnectorConfiguration(target.toString(), tcpTransport) diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/RaftUniquenessProvider.kt b/node/src/main/kotlin/net/corda/node/services/transactions/RaftUniquenessProvider.kt index 90dad60377..c90cb6d19c 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/RaftUniquenessProvider.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/RaftUniquenessProvider.kt @@ -60,7 +60,7 @@ class RaftUniquenessProvider(storagePath: Path, myAddress: HostAndPort, clusterA init { log.info("Creating Copycat server, log stored in: ${storagePath.toFile()}") val stateMachineFactory = { DistributedImmutableMap(db, DB_TABLE_NAME) } - val address = Address(myAddress.hostText, myAddress.port) + val address = Address(myAddress.host, myAddress.port) val storage = buildStorage(storagePath) val transport = buildTransport(config) val serializer = Serializer() @@ -74,7 +74,7 @@ class RaftUniquenessProvider(storagePath: Path, myAddress: HostAndPort, clusterA val serverFuture = if (clusterAddresses.isNotEmpty()) { log.info("Joining an existing Copycat cluster at $clusterAddresses") - val cluster = clusterAddresses.map { Address(it.hostText, it.port) } + val cluster = clusterAddresses.map { Address(it.host, it.port) } server.join(cluster) } else { log.info("Bootstrapping a Copycat cluster at $address") diff --git a/node/src/test/kotlin/net/corda/node/services/DistributedImmutableMapTests.kt b/node/src/test/kotlin/net/corda/node/services/DistributedImmutableMapTests.kt index cd6c4fb483..79a8397a0b 100644 --- a/node/src/test/kotlin/net/corda/node/services/DistributedImmutableMapTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/DistributedImmutableMapTests.kt @@ -90,7 +90,7 @@ class DistributedImmutableMapTests { private fun createReplica(myAddress: HostAndPort, clusterAddress: HostAndPort? = null): CompletableFuture { val storage = Storage.builder().withStorageLevel(StorageLevel.MEMORY).build() - val address = Address(myAddress.hostText, myAddress.port) + val address = Address(myAddress.host, myAddress.port) val stateMachineFactory = { DistributedImmutableMap(database, "commited_states_${myAddress.port}") } @@ -100,7 +100,7 @@ class DistributedImmutableMapTests { .build() val serverInitFuture = if (clusterAddress != null) { - val cluster = Address(clusterAddress.hostText, clusterAddress.port) + val cluster = Address(clusterAddress.host, clusterAddress.port) server.join(cluster) } else { server.bootstrap() diff --git a/node/src/test/kotlin/net/corda/node/services/NodeSchedulerServiceTest.kt b/node/src/test/kotlin/net/corda/node/services/NodeSchedulerServiceTest.kt index a41e857028..aedded4d74 100644 --- a/node/src/test/kotlin/net/corda/node/services/NodeSchedulerServiceTest.kt +++ b/node/src/test/kotlin/net/corda/node/services/NodeSchedulerServiceTest.kt @@ -8,7 +8,6 @@ import net.corda.core.flows.FlowLogic import net.corda.core.flows.FlowLogicRef import net.corda.core.flows.FlowLogicRefFactory import net.corda.core.node.ServiceHub -import net.corda.core.node.recordTransactions import net.corda.core.node.services.VaultService import net.corda.core.serialization.SingletonSerializeAsToken import net.corda.core.utilities.DUMMY_NOTARY diff --git a/node/src/test/kotlin/net/corda/node/visualiser/GroupToGraphConversion.kt b/node/src/test/kotlin/net/corda/node/visualiser/GroupToGraphConversion.kt index 046447c0f9..8963aaf4fd 100644 --- a/node/src/test/kotlin/net/corda/node/visualiser/GroupToGraphConversion.kt +++ b/node/src/test/kotlin/net/corda/node/visualiser/GroupToGraphConversion.kt @@ -9,7 +9,7 @@ import net.corda.testing.TestTransactionDSLInterpreter import org.graphstream.graph.Edge import org.graphstream.graph.Node import org.graphstream.graph.implementations.SingleGraph -import kotlin.reflect.memberProperties +import kotlin.reflect.full.memberProperties @Suppress("unused") // TODO: Re-evaluate by EOY2016 if this code is still useful and if not, delete. class GraphVisualiser(val dsl: LedgerDSL) { diff --git a/samples/irs-demo/src/main/kotlin/net/corda/irs/contract/IRS.kt b/samples/irs-demo/src/main/kotlin/net/corda/irs/contract/IRS.kt index d3387dc52f..86658dc120 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/irs/contract/IRS.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/irs/contract/IRS.kt @@ -470,7 +470,7 @@ class InterestRateSwap() : Contract { } } - override fun verify(tx: TransactionForContract) = verifyClause(tx, AllComposition(Clauses.Timestamped(), Clauses.Group()), tx.commands.select()) + override fun verify(tx: TransactionForContract) = verifyClause(tx, AllOf(Clauses.Timestamped(), Clauses.Group()), tx.commands.select()) interface Clauses { /** @@ -519,7 +519,7 @@ class InterestRateSwap() : Contract { } } - class Group : GroupClauseVerifier, Commands, UniqueIdentifier>(AnyComposition(Agree(), Fix(), Pay(), Mature())) { + class Group : GroupClauseVerifier, Commands, UniqueIdentifier>(AnyOf(Agree(), Fix(), Pay(), Mature())) { // Group by Trade ID for in / out states override fun groupStates(tx: TransactionForContract): List, UniqueIdentifier>> { return tx.groupStates() { state -> state.linearId } diff --git a/samples/irs-demo/src/main/kotlin/net/corda/simulation/TradeSimulation.kt b/samples/irs-demo/src/main/kotlin/net/corda/simulation/TradeSimulation.kt index 036fbfc92b..3caec27ccc 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/simulation/TradeSimulation.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/simulation/TradeSimulation.kt @@ -11,7 +11,6 @@ import net.corda.core.contracts.`issued by` import net.corda.core.days import net.corda.core.flatMap import net.corda.core.flows.FlowStateMachine -import net.corda.core.node.recordTransactions import net.corda.core.seconds import net.corda.core.transactions.SignedTransaction import net.corda.flows.TwoPartyTradeFlow.Buyer diff --git a/tools/loadtest/src/main/kotlin/net/corda/loadtest/ConnectionManager.kt b/tools/loadtest/src/main/kotlin/net/corda/loadtest/ConnectionManager.kt index 9710a1e908..c72721ac34 100644 --- a/tools/loadtest/src/main/kotlin/net/corda/loadtest/ConnectionManager.kt +++ b/tools/loadtest/src/main/kotlin/net/corda/loadtest/ConnectionManager.kt @@ -78,7 +78,7 @@ class ConnectionManager(private val username: String, private val jSch: JSch) { log.info("Connected to $nodeHost!") log.info("Creating tunnel from $nodeHost:$remoteMessagingPort to $localTunnelAddress...") - session.setPortForwardingL(localTunnelAddress.port, localTunnelAddress.hostText, remoteMessagingPort) + session.setPortForwardingL(localTunnelAddress.port, localTunnelAddress.host, remoteMessagingPort) log.info("Tunnel created!") val connection = NodeConnection(nodeHost, session, localTunnelAddress, rpcUsername, rpcPassword)