mirror of
https://github.com/corda/corda.git
synced 2025-01-18 10:46:38 +00:00
extraAdvertisedServiceIds config is now a list of strings, rather than a comma separated string
This commit is contained in:
parent
33717259bd
commit
7181b697a3
@ -4,7 +4,7 @@ keyStorePassword : "cordacadevpass"
|
||||
trustStorePassword : "trustpass"
|
||||
artemisAddress : "localhost:31337"
|
||||
webAddress : "localhost:31339"
|
||||
extraAdvertisedServiceIds: "corda.interest_rates"
|
||||
extraAdvertisedServiceIds : [ "corda.interest_rates" ]
|
||||
networkMapService : {
|
||||
address : "localhost:12345"
|
||||
legalName : "Network Map Service"
|
||||
|
@ -4,7 +4,7 @@ keyStorePassword : "cordacadevpass"
|
||||
trustStorePassword : "trustpass"
|
||||
artemisAddress : "localhost:31338"
|
||||
webAddress : "localhost:31340"
|
||||
extraAdvertisedServiceIds: "corda.interest_rates"
|
||||
extraAdvertisedServiceIds : [ "corda.interest_rates" ]
|
||||
networkMapService : {
|
||||
address : "localhost:12345"
|
||||
legalName : "Network Map Service"
|
||||
|
@ -4,5 +4,5 @@ keyStorePassword : "cordacadevpass"
|
||||
trustStorePassword : "trustpass"
|
||||
artemisAddress : "localhost:12345"
|
||||
webAddress : "localhost:12346"
|
||||
extraAdvertisedServiceIds: "corda.notary.validating"
|
||||
extraAdvertisedServiceIds : [ "corda.notary.validating" ]
|
||||
useHTTPS : false
|
@ -40,7 +40,7 @@ NetworkMapService plus Simple Notary configuration file.
|
||||
trustStorePassword : "trustpass"
|
||||
artemisAddress : "localhost:12345"
|
||||
webAddress : "localhost:12346"
|
||||
extraAdvertisedServiceIds: ""
|
||||
extraAdvertisedServiceIds : []
|
||||
useHTTPS : false
|
||||
devMode : true
|
||||
// Certificate signing service will be hosted by R3 in the near future.
|
||||
|
@ -4,5 +4,5 @@ keyStorePassword : "cordacadevpass"
|
||||
trustStorePassword : "trustpass"
|
||||
artemisAddress : "my-network-map:10000"
|
||||
webAddress : "localhost:10001"
|
||||
extraAdvertisedServiceIds: ""
|
||||
extraAdvertisedServiceIds : []
|
||||
useHTTPS : false
|
||||
|
@ -10,7 +10,7 @@ dataSourceProperties : {
|
||||
}
|
||||
artemisAddress : "my-corda-node:10002"
|
||||
webAddress : "localhost:10003"
|
||||
extraAdvertisedServiceIds: "corda.interest_rates"
|
||||
extraAdvertisedServiceIds : [ "corda.interest_rates" ]
|
||||
networkMapService : {
|
||||
address : "my-network-map:10000"
|
||||
legalName : "Network Map Service"
|
||||
|
@ -17,13 +17,13 @@ For ``SimpleNotaryService``, simply add the following service id to the list of
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
extraAdvertisedServiceIds: "net.corda.notary.simple"
|
||||
extraAdvertisedServiceIds : [ "net.corda.notary.simple" ]
|
||||
|
||||
For ``ValidatingNotaryService``, it is:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
extraAdvertisedServiceIds: "net.corda.notary.validating"
|
||||
extraAdvertisedServiceIds : [ "net.corda.notary.validating" ]
|
||||
|
||||
Setting up a ``RaftValidatingNotaryService`` is currently slightly more involved and is not recommended for prototyping
|
||||
purposes. There is work in progress to simplify it. To see it in action, however, you can try out the :ref:`notary-demo`.
|
||||
|
@ -207,7 +207,7 @@ class Node {
|
||||
*/
|
||||
private void installConfig() {
|
||||
// Adding required default values
|
||||
config = config.withValue('extraAdvertisedServiceIds', ConfigValueFactory.fromAnyRef(advertisedServices.join(',')))
|
||||
config = config.withValue('extraAdvertisedServiceIds', ConfigValueFactory.fromIterable(advertisedServices))
|
||||
if (notaryClusterAddresses.size() > 0) {
|
||||
config = config.withValue('notaryClusterAddresses', ConfigValueFactory.fromIterable(notaryClusterAddresses))
|
||||
}
|
||||
|
@ -147,7 +147,9 @@ Corda will now exit...""")
|
||||
}
|
||||
|
||||
private fun printPluginsAndServices(node: Node) {
|
||||
node.configuration.extraAdvertisedServiceIds.let { if (it.isNotEmpty()) printBasicNodeInfo("Providing network services", it) }
|
||||
node.configuration.extraAdvertisedServiceIds.let {
|
||||
if (it.isNotEmpty()) printBasicNodeInfo("Providing network services", it.joinToString())
|
||||
}
|
||||
val plugins = node.pluginRegistries
|
||||
.map { it.javaClass.name }
|
||||
.filterNot { it.startsWith("net.corda.node.") || it.startsWith("net.corda.core.") }
|
||||
|
@ -352,7 +352,7 @@ open class DriverDSL(
|
||||
"myLegalName" to name,
|
||||
"artemisAddress" to messagingAddress.toString(),
|
||||
"webAddress" to apiAddress.toString(),
|
||||
"extraAdvertisedServiceIds" to advertisedServices.joinToString(","),
|
||||
"extraAdvertisedServiceIds" to advertisedServices.map { it.toString() },
|
||||
"networkMapService" to mapOf(
|
||||
"address" to networkMapAddress.toString(),
|
||||
"legalName" to networkMapLegalName
|
||||
@ -463,7 +463,6 @@ open class DriverDSL(
|
||||
// node port numbers to be shifted, so all demos and docs need to be updated accordingly.
|
||||
"webAddress" to apiAddress,
|
||||
"artemisAddress" to networkMapAddress.toString(),
|
||||
"extraAdvertisedServiceIds" to "",
|
||||
"useTestClock" to useTestClock
|
||||
)
|
||||
)
|
||||
|
@ -69,7 +69,7 @@ class FullNodeConfiguration(override val baseDirectory: Path, val config: Config
|
||||
// TODO This field is slightly redundant as artemisAddress is sufficient to hold the address of the node's MQ broker.
|
||||
// Instead this should be a Boolean indicating whether that broker is an internal one started by the node or an external one
|
||||
val messagingServerAddress: HostAndPort? by config.getOrElse { null }
|
||||
val extraAdvertisedServiceIds: String by config
|
||||
val extraAdvertisedServiceIds: List<String> = config.getListOrElse<String>("extraAdvertisedServiceIds") { emptyList() }
|
||||
val useTestClock: Boolean by config.getOrElse { false }
|
||||
val notaryNodeAddress: HostAndPort? by config.getOrElse { null }
|
||||
val notaryClusterAddresses: List<HostAndPort> = config
|
||||
@ -81,7 +81,6 @@ class FullNodeConfiguration(override val baseDirectory: Path, val config: Config
|
||||
require(!useTestClock || devMode) { "Cannot use test clock outside of dev mode" }
|
||||
|
||||
val advertisedServices = extraAdvertisedServiceIds
|
||||
.split(",")
|
||||
.filter(String::isNotBlank)
|
||||
.map { ServiceInfo.parse(it) }
|
||||
.toMutableSet()
|
||||
|
@ -1 +1 @@
|
||||
gradlePluginsVersion=0.8
|
||||
gradlePluginsVersion=0.8.1
|
||||
|
@ -121,7 +121,7 @@ abstract class NodeBasedTest {
|
||||
configOverrides = mapOf(
|
||||
"myLegalName" to legalName,
|
||||
"artemisAddress" to freeLocalHostAndPort().toString(),
|
||||
"extraAdvertisedServiceIds" to advertisedServices.joinToString(","),
|
||||
"extraAdvertisedServiceIds" to advertisedServices.map { it.toString() },
|
||||
"rpcUsers" to rpcUsers.map {
|
||||
mapOf(
|
||||
"user" to it.username,
|
||||
|
Loading…
Reference in New Issue
Block a user