core.node.subsystems / NetworkMapCache / addMapService

# addMapService

`abstract fun addMapService(smm: StateMachineManager, net: MessagingService, service: NodeInfo, subscribe: Boolean, ifChangedSinceVer: Int? = null): <ERROR CLASS><Unit>`

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

### Parameters

`smm` - state machine manager to use when requesting
`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.