com.r3corda.node.services.network / InMemoryNetworkMapCache / addMapService

addMapService

open fun addMapService(net: MessagingService, service: NodeInfo, subscribe: Boolean, ifChangedSinceVer: Int?): <ERROR CLASS><Unit>
Overrides NetworkMapCache.addMapService

Add a network map service; fetches a copy of the latest map from the service and subscribes to any further updates.

Parameters

net - the network messaging service.

service - the network map service to fetch current state from.

subscribe - if the cache should subscribe to updates.

ifChangedSinceVer - an optional version number to limit updating the map based on. If the latest map version is less than or equal to the given version, no update is fetched.