diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt index 86dd6d95e6..15e2223f6e 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt @@ -188,7 +188,7 @@ class DriverDSLImpl( } } - override fun startNode(defaultParameters: NodeParameters, + override fun startNode(defaultParameters: NodeParameters, providedName: CordaX500Name?, rpcUsers: List, verifierType: VerifierType, @@ -227,7 +227,7 @@ class DriverDSLImpl( val registrationFuture = if (compatibilityZone?.rootCert != null) { // We don't need the network map to be available to be able to register the node - startNodeRegistration(name, compatibilityZone.rootCert, compatibilityZone.config()) + startNodeRegistration(name, compatibilityZone.rootCert, compatibilityZone.config(), customOverrides) } else { doneFuture(Unit) } @@ -287,21 +287,23 @@ class DriverDSLImpl( private fun startNodeRegistration( providedName: CordaX500Name, rootCert: X509Certificate, - networkServicesConfig: NetworkServicesConfig + networkServicesConfig: NetworkServicesConfig, + customOverrides: Map = mapOf() ): CordaFuture { val baseDirectory = baseDirectory(providedName).createDirectories() + val overrides = configOf( + "p2pAddress" to portAllocation.nextHostAndPort().toString(), + "compatibilityZoneURL" to networkServicesConfig.doormanURL.toString(), + "myLegalName" to providedName.toString(), + "rpcSettings" to mapOf( + "address" to portAllocation.nextHostAndPort().toString(), + "adminAddress" to portAllocation.nextHostAndPort().toString() + ), + "devMode" to false) + customOverrides val config = NodeConfig(ConfigHelper.loadConfig( baseDirectory = baseDirectory, allowMissingConfig = true, - configOverrides = configOf( - "p2pAddress" to portAllocation.nextHostAndPort().toString(), - "compatibilityZoneURL" to networkServicesConfig.doormanURL.toString(), - "myLegalName" to providedName.toString(), - "rpcSettings" to mapOf( - "address" to portAllocation.nextHostAndPort().toString(), - "adminAddress" to portAllocation.nextHostAndPort().toString() - ), - "devMode" to false) + configOverrides = overrides )).checkAndOverrideForInMemoryDB() val versionInfo = VersionInfo(PLATFORM_VERSION, "1", "1", "1")