private/testplanet: remove some additional Local-s

Change-Id: I49701c41efb92efca27cc18d0a3f6d6b44d3cf8b
This commit is contained in:
Egon Elbre 2020-05-20 16:11:54 +03:00
parent 7f323754a4
commit b42778c42e
2 changed files with 2 additions and 18 deletions

View File

@ -18,7 +18,6 @@ import (
"storj.io/common/identity"
"storj.io/common/macaroon"
"storj.io/common/pb"
"storj.io/common/peertls/tlsopts"
"storj.io/common/rpc"
"storj.io/common/storj"
@ -33,7 +32,6 @@ import (
// Uplink is a general purpose
type Uplink struct {
Log *zap.Logger
Info pb.Node
Identity *identity.FullIdentity
Dialer rpc.Dialer
StorageNodeCount int
@ -109,14 +107,6 @@ func (planet *Planet) newUplink(name string, storageNodeCount int) (*Uplink, err
uplink.Dialer = rpc.NewDefaultDialer(tlsOptions)
uplink.Info = pb.Node{
Id: uplink.Identity.ID,
Address: &pb.NodeAddress{
Transport: pb.NodeTransport_TCP_TLS_GRPC,
Address: "",
},
}
for j, satellite := range planet.Satellites {
console := satellite.API.Console
@ -169,13 +159,10 @@ func (planet *Planet) newUplink(name string, storageNodeCount int) (*Uplink, err
}
// ID returns uplink id
func (client *Uplink) ID() storj.NodeID { return client.Info.Id }
func (client *Uplink) ID() storj.NodeID { return client.Identity.ID }
// Addr returns uplink address
func (client *Uplink) Addr() string { return client.Info.Address.Address }
// Local returns uplink info
func (client *Uplink) Local() pb.Node { return client.Info }
func (client *Uplink) Addr() string { return "" }
// Shutdown shuts down all uplink dependencies
func (client *Uplink) Shutdown() error { return nil }

View File

@ -691,9 +691,6 @@ func (peer *API) Close() error {
// ID returns the peer ID.
func (peer *API) ID() storj.NodeID { return peer.Identity.ID }
// Local returns the peer local node info.
func (peer *API) Local() overlay.NodeDossier { return peer.Contact.Service.Local() }
// Addr returns the public address.
func (peer *API) Addr() string { return peer.Server.Addr().String() }