[#315] cmd/node: Implement node status updating in application

Call Netmap contract on SetNetmapStatus rpc of Control service (AddPeer
method if new status is ONLINE, UpdatePeerState method otherwise).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-15 14:53:41 +03:00 committed by Alex Vanin
parent 619f8826e1
commit fa0ea35f83
2 changed files with 18 additions and 0 deletions

View file

@ -43,6 +43,7 @@ func initControlService(c *cfg) {
controlSvc.WithAuthorizedKeys(keys),
controlSvc.WithHealthChecker(c),
controlSvc.WithNetMapSource(c.cfgNetmap.wrapper),
controlSvc.WithNodeState(c),
)
var (