Skip to content

Commit

Permalink
hide ip (#3319)
Browse files Browse the repository at this point in the history
  • Loading branch information
ylsGit authored Jul 26, 2024
1 parent e690f11 commit 3c4ab9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libs/tendermint/rpc/core/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ func NetInfo(ctx *rpctypes.Context) (*ctypes.ResultNetInfo, error) {
if !ok {
return nil, fmt.Errorf("peer.NodeInfo() is not DefaultNodeInfo")
}
nodeInfo.ListenAddr = ""
nodeInfo.Other.RPCAddress = ""
peers = append(peers, ctypes.Peer{
NodeInfo: nodeInfo,
IsOutbound: peer.IsOutbound(),
ConnectionStatus: peer.Status(),
RemoteIP: peer.RemoteIP().String(),
RemoteIP: "",
})
}
// TODO: Should we include PersistentPeers and Seeds in here?
// PRO: useful info
// CON: privacy
return &ctypes.ResultNetInfo{
Listening: env.P2PTransport.IsListening(),
Listeners: env.P2PTransport.Listeners(),
Listeners: []string{""},
NPeers: len(peers),
Peers: peers,
}, nil
Expand Down

0 comments on commit 3c4ab9d

Please sign in to comment.