mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-17 16:31:06 +02:00
In this commit, we add a compatibility mode for older version of clightning to ensure that we're able to properly parse all their channel updates. An older version of c-lightning would send out encapsulated onion error message with an additional type byte. This would throw off our parsing as we didn't expect the type byte, and so we always 2 bytes off. In order to ensure that we're able to parse these messages and make adjustments to our path finding, we'll first check to see if the type byte is there, if so, then we'll snip off two bytes from the front and continue with parsing. if the bytes aren't found, then we can proceed as normal and parse the request.
lnwire
The lnwire package implements the Lightning Network wire protocol.
This package has intentionally been designed so it can be used as a standalone package for any projects needing to interface with lightning peers at the wire protocol level.
Installation and Updating
$ go get -u github.com/lightningnetwork/lnd/lnwire