f64ae55806
There is a need to prevent limitless abuse of MAINTENANCE status of the storage nodes. To do this, configuration of the NeoFS network is going to be extended with the flag which allows the state. Until this is done, it makes sense to prepare a site for this in the code. Define `state.NetworkSettings` interface as an abstraction of global network configuration within the `state` package. Make `NetMapCandidateValidator` to depend on `NetworkSettings` and provide corresponding field setter. Change `VerifyAndUpdate` method's behavior to return an error for candidates with MAINTENANCE state if this state is disallowed by the network configuration. Provide `NetworkSettings` from the wrapper over Netmap contract's client on Inner Ring application side. The provider is implemented to statically disallow MAINTENANCE mode in order to save previous behavior. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru> Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com> |
||
---|---|---|
.. | ||
config | ||
internal/client | ||
processors | ||
timers | ||
alphabet.go | ||
bindings.go | ||
blocktimer.go | ||
contracts.go | ||
fetcher.go | ||
indexer.go | ||
innerring.go | ||
locode.go | ||
netmap.go | ||
notary.go | ||
rpc.go | ||
settlement.go | ||
state.go | ||
subnet.go |