From 7a3a827d3589821cc61ef78014a79f54f7c0acab Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 19 Sep 2022 19:43:53 +0400 Subject: [PATCH] [#1680] node/netmap: Support `MaintenanceModeAllowed` config in RPC After recent changes network configuration stored in the Netmap contract of the NeoFS Sidechain contains `MaintenanceModeAllowed` flag. There is a need to support this value in Storage node application. Make `NetmapService.NetworkInfo` RPC server of the storage node to set `MaintenanceModeAllowed` flag according to corresponding value in the Sidechain. Signed-off-by: Leonard Lyubich --- cmd/neofs-node/netmap.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/neofs-node/netmap.go b/cmd/neofs-node/netmap.go index 51914c9f..bc68a44b 100644 --- a/cmd/neofs-node/netmap.go +++ b/cmd/neofs-node/netmap.go @@ -404,6 +404,10 @@ func (n *netInfo) Dump(ver version.Version) (*netmapSDK.NetworkInfo, error) { ni.DisableHomomorphicHashing() } + if netInfoMorph.MaintenanceModeAllowed { + ni.AllowMaintenanceMode() + } + for i := range netInfoMorph.Raw { ni.SetRawNetworkParameter(netInfoMorph.Raw[i].Name, netInfoMorph.Raw[i].Value) }