From c20c2e3b398ded2e592c24194e63072862a81fb0 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 6 Oct 2022 11:51:22 +0300 Subject: [PATCH] [#1845] morph/client: Use 0 as OfflineState in update peer As the documentation prescribes. Signed-off-by: Evgenii Stratonikov --- pkg/morph/client/netmap/update_state.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/morph/client/netmap/update_state.go b/pkg/morph/client/netmap/update_state.go index a8812d1d4a..2e719975f7 100644 --- a/pkg/morph/client/netmap/update_state.go +++ b/pkg/morph/client/netmap/update_state.go @@ -46,6 +46,10 @@ func (c *Client) UpdatePeerState(p UpdatePeerPrm) error { method += "IR" } + if p.state == 0 { + p.state = netmap.NodeStateOffline + } + prm := client.InvokePrm{} prm.SetMethod(method) prm.SetArgs(int64(p.state), p.key)