mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-20 21:30:06 +02:00
Merge pull request #6546 from carlaKC/bolts-950-warningmessage
lnwire/peer: add ability to read + log peer warning messages
This commit is contained in:
@@ -1455,6 +1455,10 @@ out:
|
||||
break out
|
||||
}
|
||||
|
||||
case *lnwire.Warning:
|
||||
targetChan = msg.ChanID
|
||||
isLinkUpdate = p.handleError(&msg.Error)
|
||||
|
||||
case *lnwire.Error:
|
||||
targetChan = msg.ChanID
|
||||
isLinkUpdate = p.handleError(msg)
|
||||
@@ -1688,6 +1692,9 @@ func messageSummary(msg lnwire.Message) string {
|
||||
return fmt.Sprintf("chan_id=%v, id=%v, fail_code=%v",
|
||||
msg.ChanID, msg.ID, msg.FailureCode)
|
||||
|
||||
case *lnwire.Warning:
|
||||
return fmt.Sprintf("%v", msg.Error.Error())
|
||||
|
||||
case *lnwire.Error:
|
||||
return fmt.Sprintf("%v", msg.Error())
|
||||
|
||||
|
Reference in New Issue
Block a user