discovery: fix confusing loggings

This commit is contained in:
yyforyongyu
2023-02-03 01:32:46 +08:00
parent 93b7821df3
commit c6c218f384

View File

@@ -944,9 +944,7 @@ func (d *deDupedAnnouncements) addMsg(message networkMsg) {
// timestamp, then we'll just discard the message we got. // timestamp, then we'll just discard the message we got.
if oldTimestamp > msg.Timestamp { if oldTimestamp > msg.Timestamp {
log.Debugf("Ignored outdated network message: "+ log.Debugf("Ignored outdated network message: "+
"peer=%v, source=%x, msg=%s, ", message.peer, "peer=%v, msg=%s", message.peer, msg.MsgType())
message.source.SerializeCompressed(),
msg.MsgType())
return return
} }
@@ -1282,10 +1280,8 @@ func (d *AuthenticatedGossiper) networkHandler() {
case announcement := <-d.networkMsgs: case announcement := <-d.networkMsgs:
log.Tracef("Received network message: "+ log.Tracef("Received network message: "+
"peer=%v, source=%x, msg=%s, is_remote=%v", "peer=%v, msg=%s, is_remote=%v",
announcement.peer, announcement.peer, announcement.msg.MsgType(),
announcement.source.SerializeCompressed(),
announcement.msg.MsgType(),
announcement.isRemote) announcement.isRemote)
switch announcement.msg.(type) { switch announcement.msg.(type) {
@@ -2629,9 +2625,8 @@ func (d *AuthenticatedGossiper) handleChanUpdate(nMsg *networkMsg,
) { ) {
log.Debugf("Ignored stale edge policy for short_chan_id(%v): "+ log.Debugf("Ignored stale edge policy for short_chan_id(%v): "+
"peer=%v, source=%x, msg=%s, is_remote=%v", shortChanID, "peer=%v, msg=%s, is_remote=%v", shortChanID,
nMsg.peer, nMsg.source.SerializeCompressed(), nMsg.peer, nMsg.msg.MsgType(), nMsg.isRemote,
nMsg.msg.MsgType(), nMsg.isRemote,
) )
nMsg.err <- nil nMsg.err <- nil