@@ -542,16 +542,15 @@ class DriverDSLImpl(
542
542
rootCert : X509Certificate ,
543
543
compatibilityZone : CompatibilityZoneParams
544
544
): CordaFuture <Pair <NodeConfig ,NotaryInfo >> {
545
- val notaryConfig = mapOf (" notary" to mapOf (" validating" to spec.validating))
546
- val parameters = NodeParameters (rpcUsers = spec.rpcUsers, verifierType = spec.verifierType, customOverrides = notaryConfig + notaryCustomOverrides, maximumHeapSize = spec.maximumHeapSize)
545
+ val parameters = NodeParameters (rpcUsers = spec.rpcUsers, verifierType = spec.verifierType, customOverrides = notaryCustomOverrides, maximumHeapSize = spec.maximumHeapSize)
547
546
return createSchema(createConfig(spec.name, parameters), false ).flatMap { config ->
548
547
startNodeRegistration(config, rootCert, compatibilityZone.config())}.flatMap { config ->
549
548
// Node registration only gives us the node CA cert, not the identity cert. That is only created on first
550
549
// startup or when the node is told to just generate its node info file. We do that here.
551
550
if (startNodesInProcess) {
552
551
executorService.fork {
553
552
val nodeInfo = Node (config.corda, MOCK_VERSION_INFO , initialiseSerialization = false ).generateAndSaveNodeInfo()
554
- Pair (config, NotaryInfo (nodeInfo.legalIdentities[0 ], spec.validating))
553
+ Pair (config.withNotaryDefinition(spec.validating) , NotaryInfo (nodeInfo.legalIdentities[0 ], spec.validating))
555
554
}
556
555
} else {
557
556
// TODO The config we use here is uses a hardocded p2p port which changes when the node is run proper
@@ -563,7 +562,7 @@ class DriverDSLImpl(
563
562
.get()
564
563
}
565
564
val nodeInfo = nodeInfoFile.readObject<SignedNodeInfo >().verified()
566
- Pair (config, NotaryInfo (nodeInfo.legalIdentities[0 ], spec.validating))
565
+ Pair (config.withNotaryDefinition(spec.validating), NotaryInfo (nodeInfo.legalIdentities[0 ], spec.validating))
567
566
}
568
567
}
569
568
}
@@ -819,6 +818,10 @@ class DriverDSLImpl(
819
818
val corda: NodeConfiguration = typesafe.parseAsNodeConfiguration().value()
820
819
}
821
820
821
+ private fun NodeConfig.withNotaryDefinition (validating : Boolean ): NodeConfig {
822
+ return NodeConfig (this .typesafe.plus(mapOf (" notary" to mapOf (" validating" to validating))))
823
+ }
824
+
822
825
companion object {
823
826
private val RPC_CONNECT_POLL_INTERVAL : Duration = 100 .millis
824
827
internal val log = contextLogger()
0 commit comments