diff --git a/cmd/neofs-node/container.go b/cmd/neofs-node/container.go index b57b983e8b..dabcdefd2a 100644 --- a/cmd/neofs-node/container.go +++ b/cmd/neofs-node/container.go @@ -228,16 +228,6 @@ func (*morphLoadWriter) Close() error { return nil } -type nopLoadWriter struct{} - -func (nopLoadWriter) Put(containerSDK.UsedSpaceAnnouncement) error { - return nil -} - -func (nopLoadWriter) Close() error { - return nil -} - type remoteLoadAnnounceProvider struct { key *ecdsa.PrivateKey @@ -251,15 +241,10 @@ type remoteLoadAnnounceProvider struct { } func (r *remoteLoadAnnounceProvider) InitRemote(srv loadroute.ServerInfo) (loadcontroller.WriterProvider, error) { - if srv == nil { + if srv == nil || r.netmapKeys.IsLocalKey(srv.PublicKey()) { return r.deadEndProvider, nil } - if r.netmapKeys.IsLocalKey(srv.PublicKey()) { - // if local => return no-op writer - return loadcontroller.SimpleWriterProvider(new(nopLoadWriter)), nil - } - var info client.NodeInfo err := client.NodeInfoFromRawNetmapElement(&info, srv)