-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lnwire+peer: introduce new error for unknown message type for forward…
… compat This commit adds a new error type to the `lnwire` package: `UnknownMessage`. With this error we can catch the particular case of a an error during reading that encounters a new or unknown message. When we encounter this message in the peer’s readHandler, we can now gracefully handle it by just skipping to the next message rather than closing out the section entirely. This puts us a bit closer to the spec, but not exactly as it has an additional constraint that we can only ignore a new message if it has an odd type. In a future release, we’ll modify this code to match the spec as written.
- Loading branch information
Showing
2 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters