mirror of
https://github.com/corda/corda.git
synced 2024-12-23 23:02:29 +00:00
irs-demo: Fix advertised services
This commit is contained in:
parent
54967afb78
commit
aa82d4441e
@ -357,14 +357,17 @@ private fun createRecipient(addr: String) : SingleMessageRecipient {
|
||||
private fun startNode(params: CliParams.RunNode, networkMap: SingleMessageRecipient, recipients: List<SingleMessageRecipient>) : Node {
|
||||
val config = getNodeConfig(params)
|
||||
val advertisedServices: Set<ServiceType>
|
||||
val networkMapId = if (params.mapAddress.equals(params.address.toString())) {
|
||||
// This node provides network map and notary services
|
||||
advertisedServices = setOf(NetworkMapService.Type, SimpleNotaryService.Type)
|
||||
null
|
||||
} else {
|
||||
advertisedServices = setOf(NodeInterestRates.Type)
|
||||
nodeInfo(networkMap, params.identityFile, setOf(NetworkMapService.Type, SimpleNotaryService.Type))
|
||||
}
|
||||
val networkMapId =
|
||||
when (params.node) {
|
||||
IRSDemoNode.NodeA -> {
|
||||
advertisedServices = setOf(NetworkMapService.Type, SimpleNotaryService.Type)
|
||||
null
|
||||
}
|
||||
IRSDemoNode.NodeB -> {
|
||||
advertisedServices = setOf(NodeInterestRates.Type)
|
||||
nodeInfo(networkMap, params.identityFile, setOf(NetworkMapService.Type, SimpleNotaryService.Type))
|
||||
}
|
||||
}
|
||||
|
||||
val node = logElapsedTime("Node startup") {
|
||||
Node(params.dir, params.networkAddress, params.apiAddress, config, networkMapId, advertisedServices, DemoClock(),
|
||||
|
Loading…
Reference in New Issue
Block a user