diff --git a/pkg/network/address.go b/pkg/network/address.go index 3a34a0cf3..a7831dcfb 100644 --- a/pkg/network/address.go +++ b/pkg/network/address.go @@ -7,7 +7,6 @@ import ( "github.com/multiformats/go-multiaddr" manet "github.com/multiformats/go-multiaddr/net" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" ) /* @@ -38,11 +37,6 @@ func (a Address) Equal(addr Address) bool { return a.ma.Equal(addr.ma) } -// WriteToNodeInfo writes Address to netmap.NodeInfo structure. -func (a Address) WriteToNodeInfo(ni *netmap.NodeInfo) { - ni.SetAddress(a.ma.String()) -} - // HostAddr returns host address in string format. // // Panics if host address cannot be fetched from Address. diff --git a/pkg/network/address_test.go b/pkg/network/address_test.go index 91f606a85..a293b7ed1 100644 --- a/pkg/network/address_test.go +++ b/pkg/network/address_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/multiformats/go-multiaddr" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" "github.com/stretchr/testify/require" ) @@ -66,22 +65,3 @@ func buildMultiaddr(s string, t *testing.T) multiaddr.Multiaddr { require.NoError(t, err) return ma } - -func TestAddress_WriteToNodeInfo(t *testing.T) { - a := "127.0.0.1:8080" - - var addr Address - - err := addr.FromString(a) - require.NoError(t, err) - - var ni netmap.NodeInfo - - addr.WriteToNodeInfo(&ni) - - var restored Address - - err = restored.FromString(ni.Address()) - require.NoError(t, err) - require.True(t, restored.Equal(addr)) -}