[#298] morph/netmap: Use netmap.NodeState argument in UpdatePeerState

Replace custom NodeState enum with the one from netmap lib. Remove no longer
used NodeState enum.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-11 17:36:55 +03:00 committed by Alex Vanin
parent b45360b933
commit d58e28afee
2 changed files with 4 additions and 14 deletions

View file

@ -4,7 +4,6 @@ import (
"github.com/nspcc-dev/neofs-api-go/pkg/netmap"
netmapGRPC "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper"
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
netmapEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/netmap"
netmapTransportGRPC "github.com/nspcc-dev/neofs-node/pkg/network/transport/netmap/grpc"
@ -119,7 +118,7 @@ func addNewEpochNotificationHandler(c *cfg, h event.Handler) {
func goOffline(c *cfg) {
err := c.cfgNetmap.wrapper.UpdatePeerState(
crypto.MarshalPublicKey(&c.key.PublicKey),
wrapper.StateOffline,
netmap.NodeStateOffline,
)
if err != nil {