mirror of
https://github.com/corda/corda.git
synced 2025-06-18 23:28:21 +00:00
Remove hostNotaryServiceLocally config property – nodes need to specify the correct notary service type in extraAdvertisedServiceIds
This commit is contained in:
@ -14,7 +14,6 @@ import com.r3corda.node.services.messaging.ArtemisMessagingServer
|
||||
import com.r3corda.node.services.messaging.NodeMessagingClient
|
||||
import com.r3corda.node.services.network.InMemoryNetworkMapCache
|
||||
import com.r3corda.node.services.network.NetworkMapService
|
||||
import com.r3corda.node.services.transactions.NotaryService
|
||||
import com.r3corda.node.utilities.AffinityExecutor
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigRenderOptions
|
||||
@ -292,7 +291,6 @@ class DriverDSL(
|
||||
val name = providedName ?: "${pickA(name)}-${messagingAddress.port}"
|
||||
|
||||
val nodeDirectory = "$baseDirectory/$name"
|
||||
val useNotary = advertisedServices.any { it.type.isSubTypeOf(NotaryService.Type) }
|
||||
|
||||
val config = NodeConfiguration.loadConfig(
|
||||
baseDirectoryPath = Paths.get(nodeDirectory),
|
||||
@ -302,7 +300,6 @@ class DriverDSL(
|
||||
"basedir" to Paths.get(nodeDirectory).normalize().toString(),
|
||||
"artemisAddress" to messagingAddress.toString(),
|
||||
"webAddress" to apiAddress.toString(),
|
||||
"hostNotaryServiceLocally" to useNotary.toString(),
|
||||
"extraAdvertisedServiceIds" to advertisedServices.joinToString(","),
|
||||
"networkMapAddress" to networkMapAddress.toString()
|
||||
)
|
||||
@ -408,7 +405,6 @@ class DriverDSL(
|
||||
"basedir" to Paths.get(nodeDirectory).normalize().toString(),
|
||||
"artemisAddress" to networkMapAddress.toString(),
|
||||
"webAddress" to apiAddress.toString(),
|
||||
"hostNotaryServiceLocally" to "false",
|
||||
"extraAdvertisedServiceIds" to ""
|
||||
)
|
||||
)
|
||||
|
@ -9,7 +9,6 @@ import com.r3corda.node.internal.Node
|
||||
import com.r3corda.node.serialization.NodeClock
|
||||
import com.r3corda.node.services.messaging.NodeMessagingClient
|
||||
import com.r3corda.node.services.network.NetworkMapService
|
||||
import com.r3corda.node.services.transactions.SimpleNotaryService
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import com.typesafe.config.ConfigParseOptions
|
||||
@ -139,13 +138,11 @@ class FullNodeConfiguration(conf: Config) : NodeConfiguration {
|
||||
val webAddress: HostAndPort by conf
|
||||
val messagingServerAddress: HostAndPort? = if (conf.hasPath("messagingServerAddress")) HostAndPort.fromString(conf.getString("messagingServerAddress")) else null
|
||||
val networkMapAddress: HostAndPort? = if (conf.hasPath("networkMapAddress")) HostAndPort.fromString(conf.getString("networkMapAddress")) else null
|
||||
val hostNotaryServiceLocally: Boolean by conf
|
||||
val extraAdvertisedServiceIds: String by conf
|
||||
val clock: Clock = NodeClock()
|
||||
|
||||
fun createNode(): Node {
|
||||
val advertisedServices = mutableSetOf<ServiceInfo>()
|
||||
if (hostNotaryServiceLocally) advertisedServices.add(ServiceInfo(SimpleNotaryService.Type))
|
||||
if (!extraAdvertisedServiceIds.isNullOrEmpty()) {
|
||||
for (serviceId in extraAdvertisedServiceIds.split(",")) {
|
||||
advertisedServices.add(ServiceInfo.parse(serviceId))
|
||||
|
@ -11,6 +11,5 @@ dataSourceProperties = {
|
||||
"dataSource.password" = ""
|
||||
}
|
||||
devMode = true
|
||||
hostNotaryServiceLocally = false
|
||||
certificateSigningService = "https://cordaci-netperm.corda.r3cev.com"
|
||||
useHTTPS = false
|
Reference in New Issue
Block a user