mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
Remove nearestCity from node configuration. (#721)
* Fix bug in demobench. Explorer didn't show correctly location of a node. There was no nearestCity override in config. * Remove nearestCity from node configuration. Now information about the location is always taken from node's legal name. If not present - exception on node startup. * Add X500Name.locationOrNull that soft fails when location is not in X500 name. Address PR comments. * Remove unused imports.
This commit is contained in:
committed by
GitHub
parent
f210370885
commit
39fdb353ad
@ -154,7 +154,9 @@ abstract class AbstractNode(open val configuration: NodeConfiguration,
|
||||
}
|
||||
}
|
||||
|
||||
open fun findMyLocation(): PhysicalLocation? = CityDatabase[configuration.nearestCity]
|
||||
open fun findMyLocation(): PhysicalLocation? {
|
||||
return configuration.myLegalName.locationOrNull?.let { CityDatabase[it] }
|
||||
}
|
||||
|
||||
lateinit var info: NodeInfo
|
||||
lateinit var storage: TxWritableStorageService
|
||||
|
@ -21,7 +21,6 @@ interface NodeConfiguration : NodeSSLConfiguration {
|
||||
val myLegalName: X500Name
|
||||
val networkMapService: NetworkMapInfo?
|
||||
val minimumPlatformVersion: Int
|
||||
val nearestCity: String
|
||||
val emailAddress: String
|
||||
val exportJMXto: String
|
||||
val dataSourceProperties: Properties
|
||||
@ -40,7 +39,6 @@ data class FullNodeConfiguration(
|
||||
ReplaceWith("baseDirectory"))
|
||||
val basedir: Path,
|
||||
override val myLegalName: X500Name,
|
||||
override val nearestCity: String,
|
||||
override val emailAddress: String,
|
||||
override val keyStorePassword: String,
|
||||
override val trustStorePassword: String,
|
||||
|
@ -123,7 +123,6 @@ class NetworkRegistrationHelper(val config: NodeConfiguration, val certService:
|
||||
println("Certificate signing request with the following information will be submitted to the Corda certificate signing server.")
|
||||
println()
|
||||
println("Legal Name: ${config.myLegalName}")
|
||||
println("Nearest City: ${config.nearestCity}")
|
||||
println("Email: ${config.emailAddress}")
|
||||
println()
|
||||
println("Public Key: ${keyPair.public}")
|
||||
|
@ -1,5 +1,4 @@
|
||||
myLegalName = "Vast Global MegaCorp, Ltd"
|
||||
nearestCity = "London"
|
||||
emailAddress = "admin@company.com"
|
||||
exportJMXto = "http"
|
||||
keyStorePassword = "cordacadevpass"
|
||||
|
Reference in New Issue
Block a user