Merge pull request #6546 from carlaKC/bolts-950-warningmessage

lnwire/peer: add ability to read + log peer warning messages
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2022-06-30 16:56:20 -07:00
commit 7b56b67f34
6 files changed
+56 -1

No files matched your search

+7
View File
@@ -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