peer: display lnwire.Error body as ascii string in messageSummary

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.
This commit is contained in:
Olaoluwa Osuntokun 2017-11-30 22:19:12 -08:00
parent 260ff8831a
commit c3ec32e67b
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

View File

@ -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,