mirror of
https://github.com/corda/corda.git
synced 2025-06-17 14:48:16 +00:00
extraAdvertisedServiceIds config is now a list of strings, rather than a comma separated string
This commit is contained in:
@ -4,7 +4,7 @@ keyStorePassword : "cordacadevpass"
|
|||||||
trustStorePassword : "trustpass"
|
trustStorePassword : "trustpass"
|
||||||
artemisAddress : "localhost:31337"
|
artemisAddress : "localhost:31337"
|
||||||
webAddress : "localhost:31339"
|
webAddress : "localhost:31339"
|
||||||
extraAdvertisedServiceIds: "corda.interest_rates"
|
extraAdvertisedServiceIds : [ "corda.interest_rates" ]
|
||||||
networkMapService : {
|
networkMapService : {
|
||||||
address : "localhost:12345"
|
address : "localhost:12345"
|
||||||
legalName : "Network Map Service"
|
legalName : "Network Map Service"
|
||||||
|
@ -4,7 +4,7 @@ keyStorePassword : "cordacadevpass"
|
|||||||
trustStorePassword : "trustpass"
|
trustStorePassword : "trustpass"
|
||||||
artemisAddress : "localhost:31338"
|
artemisAddress : "localhost:31338"
|
||||||
webAddress : "localhost:31340"
|
webAddress : "localhost:31340"
|
||||||
extraAdvertisedServiceIds: "corda.interest_rates"
|
extraAdvertisedServiceIds : [ "corda.interest_rates" ]
|
||||||
networkMapService : {
|
networkMapService : {
|
||||||
address : "localhost:12345"
|
address : "localhost:12345"
|
||||||
legalName : "Network Map Service"
|
legalName : "Network Map Service"
|
||||||
|
@ -4,5 +4,5 @@ keyStorePassword : "cordacadevpass"
|
|||||||
trustStorePassword : "trustpass"
|
trustStorePassword : "trustpass"
|
||||||
artemisAddress : "localhost:12345"
|
artemisAddress : "localhost:12345"
|
||||||
webAddress : "localhost:12346"
|
webAddress : "localhost:12346"
|
||||||
extraAdvertisedServiceIds: "corda.notary.validating"
|
extraAdvertisedServiceIds : [ "corda.notary.validating" ]
|
||||||
useHTTPS : false
|
useHTTPS : false
|
@ -40,7 +40,7 @@ NetworkMapService plus Simple Notary configuration file.
|
|||||||
trustStorePassword : "trustpass"
|
trustStorePassword : "trustpass"
|
||||||
artemisAddress : "localhost:12345"
|
artemisAddress : "localhost:12345"
|
||||||
webAddress : "localhost:12346"
|
webAddress : "localhost:12346"
|
||||||
extraAdvertisedServiceIds: ""
|
extraAdvertisedServiceIds : []
|
||||||
useHTTPS : false
|
useHTTPS : false
|
||||||
devMode : true
|
devMode : true
|
||||||
// Certificate signing service will be hosted by R3 in the near future.
|
// Certificate signing service will be hosted by R3 in the near future.
|
||||||
|
@ -4,5 +4,5 @@ keyStorePassword : "cordacadevpass"
|
|||||||
trustStorePassword : "trustpass"
|
trustStorePassword : "trustpass"
|
||||||
artemisAddress : "my-network-map:10000"
|
artemisAddress : "my-network-map:10000"
|
||||||
webAddress : "localhost:10001"
|
webAddress : "localhost:10001"
|
||||||
extraAdvertisedServiceIds: ""
|
extraAdvertisedServiceIds : []
|
||||||
useHTTPS : false
|
useHTTPS : false
|
||||||
|
@ -10,7 +10,7 @@ dataSourceProperties : {
|
|||||||
}
|
}
|
||||||
artemisAddress : "my-corda-node:10002"
|
artemisAddress : "my-corda-node:10002"
|
||||||
webAddress : "localhost:10003"
|
webAddress : "localhost:10003"
|
||||||
extraAdvertisedServiceIds: "corda.interest_rates"
|
extraAdvertisedServiceIds : [ "corda.interest_rates" ]
|
||||||
networkMapService : {
|
networkMapService : {
|
||||||
address : "my-network-map:10000"
|
address : "my-network-map:10000"
|
||||||
legalName : "Network Map Service"
|
legalName : "Network Map Service"
|
||||||
|
@ -17,13 +17,13 @@ For ``SimpleNotaryService``, simply add the following service id to the list of
|
|||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
extraAdvertisedServiceIds: "net.corda.notary.simple"
|
extraAdvertisedServiceIds : [ "net.corda.notary.simple" ]
|
||||||
|
|
||||||
For ``ValidatingNotaryService``, it is:
|
For ``ValidatingNotaryService``, it is:
|
||||||
|
|
||||||
.. parsed-literal::
|
.. 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
|
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`.
|
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() {
|
private void installConfig() {
|
||||||
// Adding required default values
|
// Adding required default values
|
||||||
config = config.withValue('extraAdvertisedServiceIds', ConfigValueFactory.fromAnyRef(advertisedServices.join(',')))
|
config = config.withValue('extraAdvertisedServiceIds', ConfigValueFactory.fromIterable(advertisedServices))
|
||||||
if (notaryClusterAddresses.size() > 0) {
|
if (notaryClusterAddresses.size() > 0) {
|
||||||
config = config.withValue('notaryClusterAddresses', ConfigValueFactory.fromIterable(notaryClusterAddresses))
|
config = config.withValue('notaryClusterAddresses', ConfigValueFactory.fromIterable(notaryClusterAddresses))
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,9 @@ Corda will now exit...""")
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun printPluginsAndServices(node: Node) {
|
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
|
val plugins = node.pluginRegistries
|
||||||
.map { it.javaClass.name }
|
.map { it.javaClass.name }
|
||||||
.filterNot { it.startsWith("net.corda.node.") || it.startsWith("net.corda.core.") }
|
.filterNot { it.startsWith("net.corda.node.") || it.startsWith("net.corda.core.") }
|
||||||
|
@ -352,7 +352,7 @@ open class DriverDSL(
|
|||||||
"myLegalName" to name,
|
"myLegalName" to name,
|
||||||
"artemisAddress" to messagingAddress.toString(),
|
"artemisAddress" to messagingAddress.toString(),
|
||||||
"webAddress" to apiAddress.toString(),
|
"webAddress" to apiAddress.toString(),
|
||||||
"extraAdvertisedServiceIds" to advertisedServices.joinToString(","),
|
"extraAdvertisedServiceIds" to advertisedServices.map { it.toString() },
|
||||||
"networkMapService" to mapOf(
|
"networkMapService" to mapOf(
|
||||||
"address" to networkMapAddress.toString(),
|
"address" to networkMapAddress.toString(),
|
||||||
"legalName" to networkMapLegalName
|
"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.
|
// node port numbers to be shifted, so all demos and docs need to be updated accordingly.
|
||||||
"webAddress" to apiAddress,
|
"webAddress" to apiAddress,
|
||||||
"artemisAddress" to networkMapAddress.toString(),
|
"artemisAddress" to networkMapAddress.toString(),
|
||||||
"extraAdvertisedServiceIds" to "",
|
|
||||||
"useTestClock" to useTestClock
|
"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.
|
// 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
|
// 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 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 useTestClock: Boolean by config.getOrElse { false }
|
||||||
val notaryNodeAddress: HostAndPort? by config.getOrElse { null }
|
val notaryNodeAddress: HostAndPort? by config.getOrElse { null }
|
||||||
val notaryClusterAddresses: List<HostAndPort> = config
|
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" }
|
require(!useTestClock || devMode) { "Cannot use test clock outside of dev mode" }
|
||||||
|
|
||||||
val advertisedServices = extraAdvertisedServiceIds
|
val advertisedServices = extraAdvertisedServiceIds
|
||||||
.split(",")
|
|
||||||
.filter(String::isNotBlank)
|
.filter(String::isNotBlank)
|
||||||
.map { ServiceInfo.parse(it) }
|
.map { ServiceInfo.parse(it) }
|
||||||
.toMutableSet()
|
.toMutableSet()
|
||||||
|
@ -1 +1 @@
|
|||||||
gradlePluginsVersion=0.8
|
gradlePluginsVersion=0.8.1
|
||||||
|
@ -121,7 +121,7 @@ abstract class NodeBasedTest {
|
|||||||
configOverrides = mapOf(
|
configOverrides = mapOf(
|
||||||
"myLegalName" to legalName,
|
"myLegalName" to legalName,
|
||||||
"artemisAddress" to freeLocalHostAndPort().toString(),
|
"artemisAddress" to freeLocalHostAndPort().toString(),
|
||||||
"extraAdvertisedServiceIds" to advertisedServices.joinToString(","),
|
"extraAdvertisedServiceIds" to advertisedServices.map { it.toString() },
|
||||||
"rpcUsers" to rpcUsers.map {
|
"rpcUsers" to rpcUsers.map {
|
||||||
mapOf(
|
mapOf(
|
||||||
"user" to it.username,
|
"user" to it.username,
|
||||||
|
Reference in New Issue
Block a user