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:
parent
260ff8831a
commit
c3ec32e67b
2
peer.go
2
peer.go
@ -864,7 +864,7 @@ func messageSummary(msg lnwire.Message) string {
|
|||||||
msg.ChanID, msg.ID, msg.FailureCode)
|
msg.ChanID, msg.ID, msg.FailureCode)
|
||||||
|
|
||||||
case *lnwire.Error:
|
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:
|
case *lnwire.AnnounceSignatures:
|
||||||
return fmt.Sprintf("chan_id=%v, short_chan_id=%v", msg.ChannelID,
|
return fmt.Sprintf("chan_id=%v, short_chan_id=%v", msg.ChannelID,
|
||||||
|
Loading…
Reference in New Issue
Block a user