Store holder channel reserve and max-htlc-in-flight explicitly
authorMatt Corallo <git@bluematt.me>
Tue, 9 Nov 2021 21:12:30 +0000 (21:12 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 23 Nov 2021 21:05:07 +0000 (21:05 +0000)
commitf69311ccff517f01211415461db666db22290232
treeb2c09ed5c17c8c5ef8cac0824df40a326e8a5937
parentef86a3e20952a96f7b646a9a4154aa5dc220147a
Store holder channel reserve and max-htlc-in-flight explicitly

Previously, `holder_selected_channel_reserve_satoshis` and
`holder_max_htlc_value_in_flight_msat` were constant functions
of the channel value satoshis. However, in the future we may allow
allow users to specify it. In order to do so, we'll need to track
them explicitly, including serializing them as appropriate.

We go ahead and do so here, in part as it will make testing
different counterparty-selected channel reserve values easier.
lightning/src/ln/channel.rs