diff --git a/node/p2p/blossomsub.go b/node/p2p/blossomsub.go index edba100..d547027 100644 --- a/node/p2p/blossomsub.go +++ b/node/p2p/blossomsub.go @@ -306,6 +306,11 @@ func (b *BlossomSub) GetNetworkPeersCount() int { } func (b *BlossomSub) GetMultiaddrOfPeer(peerId []byte) string { + addrs := b.h.Peerstore().Addrs(peer.ID(peerId)) + if len(addrs) == 0 { + return "" + } + return b.h.Peerstore().Addrs(peer.ID(peerId))[0].String() }