From 3e81e89062efed9f784bb854c624dfa498763481 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Wed, 13 Mar 2019 13:35:31 -0700 Subject: [PATCH] discovery: add log when attempting to send msg reliably and peer is offline --- discovery/reliable_sender.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/discovery/reliable_sender.go b/discovery/reliable_sender.go index c336b01de..1887ff1ca 100644 --- a/discovery/reliable_sender.go +++ b/discovery/reliable_sender.go @@ -181,9 +181,19 @@ out: // ignored for now since the peer is currently offline. Once // they reconnect, the messages will be sent since they should // have been persisted to disk. - case <-peerMgr.msgs: + case msg := <-peerMgr.msgs: + // Retrieve the short channel ID for which this message + // applies for logging purposes. The error can be + // ignored as the store can only contain messages which + // have a ShortChannelID field. + shortChanID, _ := msgShortChanID(msg) + log.Debugf("Received request to send %v message for "+ + "channel=%v while peer=%x is offline", + msg.MsgType(), shortChanID, peerPubKey) + case peer = <-peerChan: break out + case <-s.quit: return }