remove usage of deprecated peerid.Pretty method (#542)

This commit is contained in:
Sukun 2023-09-14 13:41:11 +05:30 committed by GitHub
parent 825d5e3c7d
commit d13e24ddc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -170,7 +170,7 @@ func TestSimpleDiscovery(t *testing.T) {
for i, h := range hosts[1:] {
if !server.hasPeerRecord("floodsub:"+topic, h.ID()) {
t.Fatalf("Server did not register host %d with ID: %s", i+1, h.ID().Pretty())
t.Fatalf("Server did not register host %d with ID: %s", i+1, h.ID())
}
}

View File

@ -1183,7 +1183,7 @@ func (gs *GossipSubRouter) sendRPC(p peer.ID, out *RPC) {
}
func (gs *GossipSubRouter) doDropRPC(rpc *RPC, p peer.ID, reason string) {
log.Debugf("dropping message to peer %s: %s", p.Pretty(), reason)
log.Debugf("dropping message to peer %s: %s", p, reason)
gs.tracer.DropRPC(rpc, p)
// push control messages that need to be retried
ctl := rpc.GetControl()

View File

@ -1161,7 +1161,7 @@ func TestGossipsubStarTopologyWithSignedPeerRecords(t *testing.T) {
for i := range hosts[1:] {
privKey := hosts[i].Peerstore().PrivKey(hosts[i].ID())
if privKey == nil {
t.Fatalf("unable to get private key for host %s", hosts[i].ID().Pretty())
t.Fatalf("unable to get private key for host %s", hosts[i].ID())
}
ai := host.InfoFromHost(hosts[i])
rec := peer.PeerRecordFromAddrInfo(*ai)