[#603] cmd/node: Separate configuration and netmap node info

Config `NodeInfo` should be used for bootstrap. Separete local node info and
netmap one. Return configured `NodeInfo` if structure from netmap is
missing.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-11 13:55:11 +03:00 committed by Alex Vanin
parent 5a4c3dfddf
commit 6279b6343f
4 changed files with 60 additions and 84 deletions

View file

@ -75,12 +75,8 @@ func initControlService(c *cfg) {
}))
}
func (c *cfg) setNetmapStatus(st control.NetmapStatus) {
c.netStatus.Store(int32(st))
}
func (c *cfg) NetmapStatus() control.NetmapStatus {
return control.NetmapStatus(c.netStatus.Load())
return c.cfgNetmap.state.controlNetmapStatus()
}
func (c *cfg) setHealthStatus(st control.HealthStatus) {