From c3ec32e67b24bbdad71de70f8042dbe4a6faf8c2 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 30 Nov 2017 22:19:12 -0800 Subject: [PATCH] peer: display lnwire.Error body as ascii string in messageSummary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It dictates in the spec, that the error message should be an ASCII string to allow other implementations to easily discern the type of error. The other implementations do this, but we don’t yet, but we’ll go ahead and display it anyway as it’s helpful when debugging. --- peer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peer.go b/peer.go index 0b6173d4..bbf2dd7a 100644 --- a/peer.go +++ b/peer.go @@ -864,7 +864,7 @@ func messageSummary(msg lnwire.Message) string { msg.ChanID, msg.ID, msg.FailureCode) case *lnwire.Error: - return fmt.Sprintf("chan_id=%v, err=%v", msg.ChanID, msg.Data) + return fmt.Sprintf("chan_id=%v, err=%v", msg.ChanID, string(msg.Data)) case *lnwire.AnnounceSignatures: return fmt.Sprintf("chan_id=%v, short_chan_id=%v", msg.ChannelID,