multi: improve logging

This commit is contained in:
yyforyongyu
2025-03-05 14:22:52 +08:00
parent 66c94cf51f
commit be4c4cc8ff
5 changed files with 17 additions and 2 deletions

View File

@@ -2052,6 +2052,9 @@ func (l *channelLink) cleanupSpuriousResponse(pkt *htlcPacket) {
func (l *channelLink) handleUpstreamMsg(ctx context.Context,
msg lnwire.Message) {
l.log.Tracef("receive upstream msg %v, handling now... ", msg.MsgType())
defer l.log.Tracef("handled upstream msg %v", msg.MsgType())
// First check if the message is an update and we are capable of
// receiving updates right now.
if msg.MsgType().IsChannelUpdate() && !l.quiescer.CanRecvUpdates() {

View File

@@ -2243,6 +2243,9 @@ func (s *Switch) getLinkByMapping(pkt *htlcPacket) (ChannelLink, error) {
chanID := pkt.outgoingChanID
aliasID := s.cfg.IsAlias(chanID)
log.Debugf("Querying outgoing link using chanID=%v, aliasID=%v", chanID,
aliasID)
// Set the originalOutgoingChanID so the proper channel_update can be
// sent back if the option-scid-alias feature bit was negotiated.
pkt.originalOutgoingChanID = chanID
@@ -2299,6 +2302,9 @@ func (s *Switch) getLinkByMapping(pkt *htlcPacket) (ChannelLink, error) {
// forward over it and this is a channel where the option-scid-alias
// feature bit was negotiated.
if link.IsUnadvertised() {
log.Debugf("Link is unadvertised, chanID=%v, baseScid=%v",
chanID, baseScid)
return nil, ErrChannelLinkNotFound
}