Add explanation to NetworkMapCache docs. (#1727)

NodeInfo lookup can return more than one node for distribute services.
This commit is contained in:
Katarzyna Streich
2017-09-29 15:38:05 +01:00
committed by GitHub
parent 2704165d7a
commit cac739e48d
3 changed files with 10 additions and 2 deletions

View File

@ -112,7 +112,7 @@ open class PersistentNetworkMapCache(private val serviceHub: ServiceHubInternal)
override fun getNodeByLegalIdentity(party: AbstractParty): NodeInfo? {
val wellKnownParty = serviceHub.identityService.wellKnownPartyFromAnonymous(party)
return wellKnownParty?.let {
getNodesByLegalIdentityKey(it.owningKey).singleOrNull()
getNodesByLegalIdentityKey(it.owningKey).firstOrNull()
}
}