Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated calls to peer.ID.Pretty() #113

Merged
merged 2 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/ping/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ func startServer() {
log.Println("Launching host")
host := createPeer("/ip4/0.0.0.0/tcp/9000")

log.Printf("Hello World, my hosts ID is %s\n", host.ID().Pretty())
log.Printf("Hello World, my hosts ID is %s\n", host.ID().String())
for _, addr := range host.Addrs() {
ipfsAddr, err := multiaddr.NewMultiaddr("/ipfs/" + host.ID().Pretty())
ipfsAddr, err := multiaddr.NewMultiaddr("/ipfs/" + host.ID().String())
if err != nil {
panic(err)
}
Expand All @@ -77,7 +77,7 @@ func startServer() {
func startClient(host string, pingCount, randomDataSize int) {
fmt.Println("Launching client")
client := createPeer("/ip4/0.0.0.0/tcp/9001")
fmt.Printf("Hello World, my hosts ID is %s\n", client.ID().Pretty())
fmt.Printf("Hello World, my hosts ID is %s\n", client.ID().String())
ma, err := multiaddr.NewMultiaddr(host)
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (server *Server) ID() peer.ID {
}

func (server *Server) handle(s *streamWrap) {
logger.Debugf("%s: handling remote RPC from %s", server.host.ID().Pretty(), s.stream.Conn().RemotePeer())
logger.Debugf("%s: handling remote RPC from %s", server.host.ID().String(), s.stream.Conn().RemotePeer())
var svcID ServiceID
ctx := context.Background()

Expand Down