mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-02 17:08:34 +02:00
This fixes a decoding error when the list of short channel ids within a QueryShortChanIDs message started with a zero sid. BOLT-0007 specifies that lists of short channel ids should be sorted in ascending order. Previously, this was checked within lnwire by comparing two consecutive sids in the list, starting at the empty (zero) sid. This meant that a list that started with a zero sid couldn't be decoded since the first element would _not_ be greater than the last one (namely: also zero). Given that one can only check for ordering starting at the second element, we add a check to ensure the proper behavior. A unit test is also added to ensure no future regressions on this behavior.
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