Merge pull request #6546 from carlaKC/bolts-950-warningmessage
lnwire/peer: add ability to read + log peer warning messages
This commit is contained in:
6 files changed
+56
-1
No files matched your search
@@ -2008,6 +2008,13 @@ func (l *channelLink) handleUpstreamMsg(msg lnwire.Message) {
|
||||
// Update the mailbox's feerate as well.
|
||||
l.mailBox.SetFeeRate(fee)
|
||||
|
||||
// In the case where we receive a warning message from our peer, just
|
||||
// log it and move on. We choose not to disconnect from our peer,
|
||||
// although we "MAY" do so according to the specification.
|
||||
case *lnwire.Warning:
|
||||
l.log.Warnf("received warning message from peer: %v",
|
||||
msg.Error.Error())
|
||||
|
||||
case *lnwire.Error:
|
||||
// Error received from remote, MUST fail channel, but should
|
||||
// only print the contents of the error message if all
|
||||
|
||||
Reference in new issue
Block a user