diff --git a/cmd/neofs-node/config/node/config_test.go b/cmd/neofs-node/config/node/config_test.go index d5335bbd..9c89df7b 100644 --- a/cmd/neofs-node/config/node/config_test.go +++ b/cmd/neofs-node/config/node/config_test.go @@ -50,7 +50,7 @@ func TestNodeSection(t *testing.T) { require.NoError(t, err) require.Equal(t, "NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM", key.Address()) - require.Equal(t, true, addr.Equal(expectedAddr)) + require.Equal(t, true, addr.Equal(*expectedAddr)) require.Equal(t, true, relay) require.Len(t, attributes, 2) diff --git a/cmd/neofs-node/object.go b/cmd/neofs-node/object.go index 65efb40d..0dbd4647 100644 --- a/cmd/neofs-node/object.go +++ b/cmd/neofs-node/object.go @@ -503,7 +503,7 @@ func (c *reputationClientConstructor) Get(addr *network.Address) (client.Client, for i := range nm.Nodes { netAddr, err := network.AddressFromString(nm.Nodes[i].Address()) if err == nil { - if netAddr.Equal(addr) { + if netAddr.Equal(*addr) { prm := truststorage.UpdatePrm{} prm.SetPeer(reputation.PeerIDFromBytes(nm.Nodes[i].PublicKey())) diff --git a/pkg/network/address.go b/pkg/network/address.go index 214e1cd1..d2905fd6 100644 --- a/pkg/network/address.go +++ b/pkg/network/address.go @@ -49,7 +49,7 @@ func (a Address) String() string { } // Equal compares Address's. -func (a Address) Equal(addr *Address) bool { +func (a Address) Equal(addr Address) bool { return a.ma.Equal(addr.ma) } @@ -129,7 +129,7 @@ func multiaddrStringFromHostAddr(host string) (string, error) { // IsLocalAddress returns true if network endpoint from local address // source is equal to network endpoint of passed address. func IsLocalAddress(src LocalAddressSource, addr *Address) bool { - return src.LocalAddress().Equal(addr) + return src.LocalAddress().Equal(*addr) } // HostAddrFromMultiaddr converts "/dns4/localhost/tcp/8080" to "localhost:8080".