mirror of
https://github.com/corda/corda.git
synced 2025-06-04 08:30:52 +00:00
Add registrations of NodeInterestRate services to support exist IRSDemo
This commit is contained in:
parent
d32db5d08a
commit
9deab37bed
@ -1,13 +1,14 @@
|
|||||||
basedir : "./standalone/node1",
|
basedir : "./standalone/nodea",
|
||||||
myLegalName : "Node 1",
|
myLegalName : "Bank A",
|
||||||
nearestCity : "London",
|
nearestCity : "London",
|
||||||
keyStorePassword : "cordacadevpass",
|
keyStorePassword : "cordacadevpass",
|
||||||
trustStorePassword : "trustpass",
|
trustStorePassword : "trustpass",
|
||||||
artemisAddress : "localhost:31337",
|
artemisAddress : "localhost:31337",
|
||||||
webAddress : "localhost:31338",
|
webAddress : "localhost:31339",
|
||||||
hostNotaryServiceLocally: false,
|
hostNotaryServiceLocally: false,
|
||||||
|
extraAdvertisedServiceIds: "corda.interest_rates",
|
||||||
mapService : {
|
mapService : {
|
||||||
hostServiceLocally : false,
|
hostServiceLocally : false,
|
||||||
address : "localhost:12345",
|
address : "localhost:12345",
|
||||||
identity : "Corda Name Service"
|
identity : "Notary Service"
|
||||||
}
|
}
|
14
config/dev/generalnodeb.conf
Normal file
14
config/dev/generalnodeb.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
basedir : "./standalone/nodeb",
|
||||||
|
myLegalName : "Bank B",
|
||||||
|
nearestCity : "London",
|
||||||
|
keyStorePassword : "cordacadevpass",
|
||||||
|
trustStorePassword : "trustpass",
|
||||||
|
artemisAddress : "localhost:31338",
|
||||||
|
webAddress : "localhost:31340",
|
||||||
|
hostNotaryServiceLocally: false,
|
||||||
|
extraAdvertisedServiceIds: "corda.interest_rates",
|
||||||
|
mapService : {
|
||||||
|
hostServiceLocally : false,
|
||||||
|
address : "localhost:12345",
|
||||||
|
identity : "Notary Service"
|
||||||
|
}
|
@ -1,11 +1,12 @@
|
|||||||
basedir : "./standalone/nameserver",
|
basedir : "./standalone/nameserver",
|
||||||
myLegalName : "Corda Name Service",
|
myLegalName : "Notary Service",
|
||||||
nearestCity : "London",
|
nearestCity : "London",
|
||||||
keyStorePassword : "cordacadevpass",
|
keyStorePassword : "cordacadevpass",
|
||||||
trustStorePassword : "trustpass",
|
trustStorePassword : "trustpass",
|
||||||
artemisAddress : "localhost:12345",
|
artemisAddress : "localhost:12345",
|
||||||
webAddress : "localhost:12346",
|
webAddress : "localhost:12346",
|
||||||
hostNotaryServiceLocally: true,
|
hostNotaryServiceLocally: true,
|
||||||
|
extraAdvertisedServiceIds: "",
|
||||||
mapService : {
|
mapService : {
|
||||||
hostServiceLocally : true,
|
hostServiceLocally : true,
|
||||||
address : ${artemisAddress},
|
address : ${artemisAddress},
|
||||||
|
@ -68,6 +68,7 @@ class FullNodeConfiguration(conf: Config) : NodeConfiguration {
|
|||||||
val artemisAddress: HostAndPort by conf
|
val artemisAddress: HostAndPort by conf
|
||||||
val webAddress: HostAndPort by conf
|
val webAddress: HostAndPort by conf
|
||||||
val hostNotaryServiceLocally: Boolean by conf
|
val hostNotaryServiceLocally: Boolean by conf
|
||||||
|
val extraAdvertisedServiceIds: String by conf
|
||||||
val mapService: AdvertisedServiceConfigImpl = AdvertisedServiceConfigImpl(conf.getConfig("mapService"))
|
val mapService: AdvertisedServiceConfigImpl = AdvertisedServiceConfigImpl(conf.getConfig("mapService"))
|
||||||
val clock: Clock = NodeClock()
|
val clock: Clock = NodeClock()
|
||||||
|
|
||||||
@ -76,6 +77,11 @@ class FullNodeConfiguration(conf: Config) : NodeConfiguration {
|
|||||||
val advertisedServices = mutableSetOf<ServiceType>()
|
val advertisedServices = mutableSetOf<ServiceType>()
|
||||||
if (mapService.hostServiceLocally) advertisedServices.add(NetworkMapService.Type)
|
if (mapService.hostServiceLocally) advertisedServices.add(NetworkMapService.Type)
|
||||||
if (hostNotaryServiceLocally) advertisedServices.add(SimpleNotaryService.Type)
|
if (hostNotaryServiceLocally) advertisedServices.add(SimpleNotaryService.Type)
|
||||||
|
if (!extraAdvertisedServiceIds.isNullOrEmpty()) {
|
||||||
|
for (serviceId in extraAdvertisedServiceIds.split(",")) {
|
||||||
|
advertisedServices.add(object : ServiceType(serviceId) {})
|
||||||
|
}
|
||||||
|
}
|
||||||
val networkMapBootstrapIdentity = Party(mapService.identity, generateKeyPair().public)
|
val networkMapBootstrapIdentity = Party(mapService.identity, generateKeyPair().public)
|
||||||
val networkMapAddress: NodeInfo? = if (mapService.hostServiceLocally) null else NodeInfo(networkMapTarget, networkMapBootstrapIdentity, setOf(NetworkMapService.Type))
|
val networkMapAddress: NodeInfo? = if (mapService.hostServiceLocally) null else NodeInfo(networkMapTarget, networkMapBootstrapIdentity, setOf(NetworkMapService.Type))
|
||||||
return Node(basedir.toAbsolutePath().normalize(),
|
return Node(basedir.toAbsolutePath().normalize(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user