diff --git a/network-management/registration-tool/build.gradle b/network-management/registration-tool/build.gradle index 6e8046259b..9ccb567445 100644 --- a/network-management/registration-tool/build.gradle +++ b/network-management/registration-tool/build.gradle @@ -39,7 +39,7 @@ configurations { task buildRegistrationTool(type: FatCapsule, dependsOn: 'jar') { group = "build" - applicationClass 'com.r3.corda.networkmanage.registration.RegistrationToolKt' + applicationClass 'com.r3.corda.networkmanage.registration.MainKt' archiveName "registration-tool-${version}.jar" capsuleManifest { applicationVersion = corda_release_version diff --git a/network-management/registration-tool/src/main/kotlin/com/r3/corda/networkmanage/registration/RegistrationTool.kt b/network-management/registration-tool/src/main/kotlin/com/r3/corda/networkmanage/registration/RegistrationTool.kt index 4b5ff0eeea..2f43346f94 100644 --- a/network-management/registration-tool/src/main/kotlin/com/r3/corda/networkmanage/registration/RegistrationTool.kt +++ b/network-management/registration-tool/src/main/kotlin/com/r3/corda/networkmanage/registration/RegistrationTool.kt @@ -22,6 +22,7 @@ import net.corda.nodeapi.internal.config.SSLConfiguration import net.corda.nodeapi.internal.config.parseAs import java.net.URL import java.nio.file.Path +import java.nio.file.Paths fun RegistrationOption.runRegistration() { val config = ConfigFactory.parseFile(configFile.toFile(), ConfigParseOptions.defaults().setAllowMissing(false)) @@ -31,7 +32,9 @@ fun RegistrationOption.runRegistration() { val sslConfig = object : SSLConfiguration { override val keyStorePassword: String by lazy { config.keyStorePassword ?: readPassword("Node Keystore password:") } override val trustStorePassword: String by lazy { config.trustStorePassword ?: readPassword("Node TrustStore password:") } - override val certificatesDirectory: Path = configFile.parent / "certificates" + val parent = configFile.parent + override val certificatesDirectory: Path = if (parent != null) parent / "certificates" + else Paths.get("certificates") } NetworkRegistrationHelper(sslConfig, diff --git a/node/src/integration-test/kotlin/net/corda/node/services/MySQLNotaryServiceTests.kt b/node/src/integration-test/kotlin/net/corda/node/services/MySQLNotaryServiceTests.kt index 229cfa90bb..b9818b7f5c 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/MySQLNotaryServiceTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/MySQLNotaryServiceTests.kt @@ -51,6 +51,7 @@ import kotlin.test.assertFailsWith class MySQLNotaryServiceTests : IntegrationTest() { companion object { val notaryName = CordaX500Name("MySQL Notary Service", "Zurich", "CH") + val notaryNodeName = CordaX500Name("Notary Replica 1", "Zurich", "CH") @ClassRule @JvmField val databaseSchemas = IntegrationTestSchemas("node_0", "node_1", "node_2") @@ -64,11 +65,10 @@ class MySQLNotaryServiceTests : IntegrationTest() { @Before fun before() { mockNet = InternalMockNetwork(cordappPackages = listOf("net.corda.testing.contracts")) - notaryParty = DevIdentityGenerator.installKeyStoreWithNodeIdentity(mockNet.baseDirectory(mockNet.nextNodeId), notaryName) + notaryParty = DevIdentityGenerator.generateDistributedNotarySingularIdentity(listOf(mockNet.baseDirectory(mockNet.nextNodeId)), notaryName) val networkParameters = NetworkParametersCopier(testNetworkParameters(listOf(NotaryInfo(notaryParty, false)))) val notaryNodeUnstarted = createNotaryNode() val nodeUnstarted = mockNet.createUnstartedNode() - val startedNodes = listOf(notaryNodeUnstarted, nodeUnstarted).map { n -> networkParameters.install(mockNet.baseDirectory(n.id)) n.start() @@ -144,7 +144,7 @@ class MySQLNotaryServiceTests : IntegrationTest() { } return mockNet.createUnstartedNode( InternalMockNodeParameters( - legalName = notaryName, + legalName = notaryNodeName, entropyRoot = BigInteger.valueOf(60L), configOverrides = { val notaryConfig = NotaryConfig(validating = false, mysql = MySQLConfiguration(dataStoreProperties)) diff --git a/node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt b/node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt index 1bc76f20db..7f03c31d4c 100644 --- a/node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt +++ b/node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt @@ -112,7 +112,7 @@ data class NotaryConfig(val validating: Boolean, "raft, bftSMaRt, custom, and mysql configs cannot be specified together" } } - val isClusterConfig: Boolean get() = raft != null || bftSMaRt != null + val isClusterConfig: Boolean get() = raft != null || bftSMaRt != null || mysql != null } data class MySQLConfiguration( @@ -399,4 +399,4 @@ data class RelayConfiguration(val relayHost: String, val username: String, val privateKeyFile: Path, val publicKeyFile: Path, - val sshPort: Int = 22) \ No newline at end of file + val sshPort: Int = 22)