Skip to content

Commit

Permalink
chore(networ): updating some logs in network (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
themantre authored Oct 24, 2023
1 parent 71004a8 commit a1c9ec1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (n *network) SendTo(msg []byte, pid lp2pcore.PeerID) error {
}

func (n *network) Broadcast(msg []byte, topicID TopicID) error {
n.logger.Debug("publishing new message", "topic", topicID)
n.logger.Trace("publishing new message", "topic", topicID)
switch topicID {
case TopicIDGeneral:
if n.generalTopic == nil {
Expand Down
3 changes: 1 addition & 2 deletions network/notifee.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func newNotifeeService(host lp2phost.Host, eventChannel chan<- Event,

func (n *NotifeeService) Connected(lp2pn lp2pnetwork.Network, conn lp2pnetwork.Conn) {
peerID := conn.RemotePeer()
n.logger.Info("connected to peer", "pid", peerID)

go func() {
for i := 0; i < 10; i++ {
Expand All @@ -39,9 +40,7 @@ func (n *NotifeeService) Connected(lp2pn lp2pnetwork.Network, conn lp2pnetwork.C

protocols, _ := lp2pn.Peerstore().SupportsProtocols(peerID, n.protocolID)
if len(protocols) > 0 {
n.logger.Info("connected to peer", "pid", peerID)
n.eventChannel <- &ConnectEvent{PeerID: peerID}

return
}
}
Expand Down

0 comments on commit a1c9ec1

Please sign in to comment.