Set `ChannelUpdate` `htlc_maximum_msat` using the peer's value
authorViktor Tigerström <11711198+ViktorTigerstrom@users.noreply.github.com>
Thu, 21 Apr 2022 22:02:27 +0000 (00:02 +0200)
committerViktor Tigerström <11711198+ViktorTigerstrom@users.noreply.github.com>
Tue, 3 May 2022 20:42:37 +0000 (22:42 +0200)
commit5c7bfa7392fc49233bebb615650eff302fdc2404
tree5883b1249e6e0aed310bd790fe11dcf67e8aa9c7
parentd13061c5121cd9c8ef2bb901a51b1f5f7006d972
Set `ChannelUpdate` `htlc_maximum_msat` using the peer's value

Use the `counterparty_max_htlc_value_in_flight_msat` value, and not the
`holder_max_htlc_value_in_flight_msat` value when creating the
`htlc_maximum_msat` value for `ChannelUpdate` messages.

BOLT 7 specifies that the field MUST be less than or equal to
`max_htlc_value_in_flight_msat` received from the peer, which we
currently are not guaranteed to adhere to by using the holder value.
lightning/src/ln/channel.rs