From 4e86443cac27932d773377c56e01dcc1de533645 Mon Sep 17 00:00:00 2001 From: Andrius Dagys Date: Tue, 25 Apr 2017 16:06:24 +0100 Subject: [PATCH] Fix Raft notary demo post name refactoring --- .../net/corda/node/utilities/ServiceIdentityGenerator.kt | 2 +- samples/raft-notary-demo/build.gradle | 4 +++- .../src/main/kotlin/net/corda/notarydemo/NotaryDemo.kt | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/node/src/main/kotlin/net/corda/node/utilities/ServiceIdentityGenerator.kt b/node/src/main/kotlin/net/corda/node/utilities/ServiceIdentityGenerator.kt index 927fd2669b..5ae8fe6381 100644 --- a/node/src/main/kotlin/net/corda/node/utilities/ServiceIdentityGenerator.kt +++ b/node/src/main/kotlin/net/corda/node/utilities/ServiceIdentityGenerator.kt @@ -41,7 +41,7 @@ object ServiceIdentityGenerator { } fun main(args: Array) { - val dirs = args[0].split(",").map { Paths.get(it) } + val dirs = args[0].split("|").map { Paths.get(it) } val serviceId = args[1] val serviceName = args[2] val quorumSize = args.getOrNull(3)?.toInt() ?: 1 diff --git a/samples/raft-notary-demo/build.gradle b/samples/raft-notary-demo/build.gradle index 3601a446ae..7ff58a370b 100644 --- a/samples/raft-notary-demo/build.gradle +++ b/samples/raft-notary-demo/build.gradle @@ -69,7 +69,9 @@ publishing { task generateNotaryIdentity(type: JavaExec) { classpath = sourceSets.main.runtimeClasspath main = "net.corda.node.utilities.ServiceIdentityGeneratorKt" - def nodeDirs = ["$deployTo/Notary1", "$deployTo/Notary2", "$deployTo/Notary3"].join(",") + def nodeDirs = ["$deployTo/CN=Notary 1,O=R3,OU=corda,L=London,C=UK", + "$deployTo/CN=Notary 2,O=R3,OU=corda,L=London,C=UK", + "$deployTo/CN=Notary 3,O=R3,OU=corda,L=London,C=UK"].join("|") args = [nodeDirs, notaryType, notaryName] } diff --git a/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/NotaryDemo.kt b/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/NotaryDemo.kt index c9899ef3b9..d0b53697cd 100644 --- a/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/NotaryDemo.kt +++ b/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/NotaryDemo.kt @@ -34,7 +34,7 @@ private class NotaryDemoClientApi(val rpc: CordaRPCOps) { } private val counterpartyNode by lazy { - rpc.networkMapUpdates().first.first { it.legalIdentity.name == BOB.name } + rpc.networkMapUpdates().first.first { it.legalIdentity.name == "CN=Counterparty,O=R3,OU=corda,L=London,C=UK" } } private companion object {