[#60] cmd/neofs-node: Implement primary network State instance

Define networkState structure and implement netmap.State interface on it.
Set epoch number on NewEpoch notification from chain. Provide
WithNetworkState option to Put service constructor.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-10-21 18:12:31 +03:00 committed by Alex Vanin
parent 16a5107ef1
commit a8481223d6
3 changed files with 29 additions and 0 deletions

View file

@ -233,6 +233,7 @@ func initObjectService(c *cfg) {
putsvc.WithFormatValidatorOpts(
objectCore.WithDeleteHandler(objGC),
),
putsvc.WithNetworkState(c.cfgNetmap.state),
)
sPutV2 := putsvcV2.NewService(