Fix warning messages#6840
Conversation
4be9167 to
5502fc2
Compare
5502fc2 to
d7e85fb
Compare
5570b13 to
a7fb4bd
Compare
There was a problem hiding this comment.
I don't really see the benefit of this - I dislike changing the peer/brontide code more than it has to be changed. I think it is better if Warning does not embed Error and either:
handleErroris duplicated with ahandleWarningfunctionhandleErrorhandles both aWarningor anErrorwithout an interface, and is renamed tohandleErrorOrWarningor something similar
There was a problem hiding this comment.
I chose option A 👍
|
Cleared the milestone for the pr as the issue (#6801) is tagged now |
6e90ecf to
09f0103
Compare
Crypt-iQ
left a comment
There was a problem hiding this comment.
i think the link test should be added back and that a fundingmanager test should be added
There was a problem hiding this comment.
I think we can actually also just fall through to the case below.
There was a problem hiding this comment.
No, and the method will be removed soon* (YY comment). However, I added in case someone is using lnwire.WriteElement outside the lnd code base for completeness.
Roasbeef
left a comment
There was a problem hiding this comment.
IIRC, you had a test that you used to repro the behavior in the first place? If we modified SendCustomMessage to allow sending messages below the custom message range w/ a build tag (for itests) then we can test this out in the wild to ensure that sending a warning doesn't lead to a force close. This should help catch any future regressions in the future.
There was a problem hiding this comment.
I think we can actually also just fall through to the case below.
There was a problem hiding this comment.
If we keep the existing Error method, then we can pass it around as a normal error. Not sure if we 100% want that behavior though...
There was a problem hiding this comment.
I would leave it like this so we do not have any error in the future using the Error interface for warnings.
359d6b8 to
7a1b788
Compare
7a1b788 to
5d71f95
Compare
|
@positiveblue the new linter rules seem to cause a few new complaints. |
06d769f to
a48b0a0
Compare
Split the logic for processing `error` and `warning` messages from our peers.
a48b0a0 to
cba5095
Compare
Stop casting warnings to errors before passing it to the service handling the message. BOLT1 talks about error and warning messages so I created a new interface called
ErrorLike.Warning messages for pending channels are now handled by the funding manager. Until now they were simply ignored.
Currently, the only action triggered by a warning messages sent by our peers is logging.
Fixes #6801