stop using go-libp2p deprecated peer.ID.Pretty

Signed-off-by: Icarus9913 <icaruswu66@qq.com>
This commit is contained in:
Icarus9913
2023-09-12 13:13:34 +08:00
parent f06d67c5a2
commit 2a8ea957fa
6 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ func (a *NetAPI) NetStat(ctx context.Context, scope string) (result api.NetStat,
if len(stat.Peers) > 0 {
result.Peers = make(map[string]network.ScopeStat, len(stat.Peers))
for p, stat := range stat.Peers {
result.Peers[p.Pretty()] = stat
result.Peers[p.String()] = stat
}
}