[#1513] morph/netmap: Use node state constants from Netmap
contract
`Netmap` contract exports enumeration of the node states. Replace using literals and constants from NeoFS API Go V2 with the values provided by contract. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
21d2f8f861
commit
808ba87e82
2 changed files with 7 additions and 6 deletions
|
@ -3,6 +3,7 @@ package netmap
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-contract/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||
)
|
||||
|
||||
|
@ -36,9 +37,9 @@ func (c *Client) UpdatePeerState(p UpdatePeerPrm) error {
|
|||
method += "IR"
|
||||
}
|
||||
|
||||
state := 2
|
||||
state := netmap.OfflineState
|
||||
if p.online {
|
||||
state = 1
|
||||
state = netmap.OnlineState
|
||||
}
|
||||
|
||||
prm := client.InvokePrm{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue