diff --git a/cmd/frostfs-node/netmap.go b/cmd/frostfs-node/netmap.go index 00bbdbf5..845649de 100644 --- a/cmd/frostfs-node/netmap.go +++ b/cmd/frostfs-node/netmap.go @@ -135,7 +135,6 @@ func (c *cfg) addressNum() int { return 0 } -// nolint: funlen func initNetmapService(c *cfg) { network.WriteToNodeInfo(c.localAddr, &c.cfgNodeInfo.localInfo) c.cfgNodeInfo.localInfo.SetPublicKey(c.key.PublicKey().Bytes()) @@ -173,6 +172,10 @@ func initNetmapService(c *cfg) { netmapGRPC.RegisterNetmapServiceServer(srv, server) } + addNewEpochNotificationHandlers(c) +} + +func addNewEpochNotificationHandlers(c *cfg) { addNewEpochNotificationHandler(c, func(ev event.Event) { c.cfgNetmap.state.setCurrentEpoch(ev.(netmapEvent.NewEpoch).EpochNumber()) })