mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
f83fde8483
In this commit we fix a compatibility issue with other implementations. Before this commit, when writing out an onion error that includes a `ChannelUpdate` we would use the `MaxPayloadLength` to get the length to encode. However, a recent update has modified that to be the max `brontide` payload length as it's possible to pad out the message with optional fields we're unaware of. As a result, we would always write out a length of 65KB or so. This didn't effect our parser as we ignore the length and decode the channel update directly as we don't need the length to do that. However, other implementations depended on the length rather than just reading the channel update, meaning that they weren't able to decode our onion errors that had channel updates. In this commit we fix that by introducing a new `writeOnionErrorChanUpdate` which will write out the precise length instead of using the max payload size. Fixes #2450. |
||
---|---|---|
.. | ||
accept_channel.go | ||
announcement_signatures.go | ||
channel_announcement.go | ||
channel_id_test.go | ||
channel_id.go | ||
channel_reestablish.go | ||
channel_update.go | ||
closing_signed.go | ||
commit_sig.go | ||
error.go | ||
features_test.go | ||
features.go | ||
funding_created.go | ||
funding_locked.go | ||
funding_signed.go | ||
gossip_timestamp_range.go | ||
init_message.go | ||
lnwire_test.go | ||
lnwire.go | ||
message.go | ||
msat_test.go | ||
msat.go | ||
netaddress_test.go | ||
netaddress.go | ||
node_announcement_test.go | ||
node_announcement.go | ||
onion_error_test.go | ||
onion_error.go | ||
open_channel.go | ||
ping.go | ||
pong.go | ||
query_channel_range.go | ||
query_short_chan_ids.go | ||
README.md | ||
reply_channel_range.go | ||
reply_short_chan_ids_end.go | ||
revoke_and_ack.go | ||
short_channel_id_test.go | ||
short_channel_id.go | ||
shutdown.go | ||
signature_test.go | ||
signature.go | ||
update_add_htlc.go | ||
update_fail_htlc.go | ||
update_fail_malformed_htlc.go | ||
update_fee.go | ||
update_fulfill_htlc.go |
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