Skip to content

Commit

Permalink
fix(p2putil): print remote address (#2331)
Browse files Browse the repository at this point in the history
Print remote address in pex utility.

issue: none
  • Loading branch information
kc1116 authored Oct 30, 2024
1 parent a692160 commit a715941
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/p2putil/pex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestRPCPeers(t *testing.T) {
})
require.NoError(t, err)

for _, network := range []netconf.ID{netconf.Staging, netconf.Omega} {
for _, network := range []netconf.ID{netconf.Mainnet, netconf.Omega, netconf.Staging} {
t.Run(network.String(), func(t *testing.T) {
rpcServer := network.Static().ConsensusRPC()
t.Logf("Fetching RPC peers from %s", rpcServer)
Expand All @@ -84,10 +84,8 @@ func TestRPCPeers(t *testing.T) {

t.Logf("Fetched %d peers", info.NPeers)
for i, peer := range info.Peers {
addr, err := p2p.NewNetAddressString(p2p.IDAddressString(peer.NodeInfo.ID(), peer.NodeInfo.ListenAddr))
require.NoError(t, err)

t.Logf("Peer %d: %s, %s", i, peer.NodeInfo.Moniker, addr)
t.Logf("Peer %d: %s, %s, %s", i, peer.NodeInfo.Moniker, peer.RemoteIP, peer.NodeInfo.ID())
}
})
}
Expand Down

0 comments on commit a715941

Please sign in to comment.