From f22b25a1bf0382e18003db1eef8b5b803b578562 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Wed, 8 Mar 2023 21:02:53 +0800 Subject: [PATCH] discovery+server: add more trace log --- discovery/gossiper.go | 3 ++- discovery/syncer.go | 2 ++ server.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/discovery/gossiper.go b/discovery/gossiper.go index 5eac87d91..c02cd0b10 100644 --- a/discovery/gossiper.go +++ b/discovery/gossiper.go @@ -1293,7 +1293,8 @@ func (d *AuthenticatedGossiper) sendRemoteBatch(annBatch []msgWithSenders) { // We'll first attempt to filter out this new message for all peers // that have active gossip syncers active. - for _, syncer := range syncerPeers { + for pub, syncer := range syncerPeers { + log.Tracef("Sending messages batch to GossipSyncer(%x)", pub) syncer.FilterGossipMsgs(annBatch...) } diff --git a/discovery/syncer.go b/discovery/syncer.go index f5c1bace5..722519fb0 100644 --- a/discovery/syncer.go +++ b/discovery/syncer.go @@ -1251,6 +1251,8 @@ func (g *GossipSyncer) FilterGossipMsgs(msgs ...msgWithSenders) { // If the peer doesn't have an update horizon set, then we won't send // it any new update messages. if g.remoteUpdateHorizon == nil { + log.Tracef("GossipSyncer(%x): skipped due to nil "+ + "remoteUpdateHorizon", g.cfg.peerPub[:]) return } diff --git a/server.go b/server.go index 915a4b51f..7758ebe8c 100644 --- a/server.go +++ b/server.go @@ -3202,7 +3202,7 @@ func (s *server) BroadcastMessage(skips map[route.Vertex]struct{}, for pubStr, sPeer := range s.peersByPub { if skips != nil { if _, ok := skips[sPeer.PubKey()]; ok { - srvrLog.Debugf("Skipping %x in broadcast with "+ + srvrLog.Tracef("Skipping %x in broadcast with "+ "pubStr=%x", sPeer.PubKey(), pubStr) continue }