@@ -224,6 +224,8 @@ pub struct CommonOpenChannelFields {
224224 pub to_self_delay : u16 ,
225225 /// The maximum number of inbound HTLCs towards channel initiator
226226 pub max_accepted_htlcs : u16 ,
227+ /// The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
228+ pub channel_reserve_satoshis : u64 ,
227229 /// The channel initiator's key controlling the funding transaction
228230 pub funding_pubkey : PublicKey ,
229231 /// Used to derive a revocation key for transactions broadcast by counterparty
@@ -259,6 +261,7 @@ impl CommonOpenChannelFields {
259261 commitment_feerate_sat_per_1000_weight : self . commitment_feerate_sat_per_1000_weight ,
260262 to_self_delay : self . to_self_delay ,
261263 max_accepted_htlcs : self . max_accepted_htlcs ,
264+ channel_reserve_satoshis : self . channel_reserve_satoshis ,
262265 }
263266 }
264267}
@@ -282,6 +285,8 @@ pub struct ChannelParameters {
282285 pub to_self_delay : u16 ,
283286 /// The maximum number of pending HTLCs towards the channel initiator.
284287 pub max_accepted_htlcs : u16 ,
288+ /// The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
289+ pub channel_reserve_satoshis : u64 ,
285290}
286291
287292/// An [`open_channel`] message to be sent to or received from a peer.
@@ -3016,6 +3021,7 @@ impl LengthReadable for OpenChannel {
30163021 commitment_feerate_sat_per_1000_weight,
30173022 to_self_delay,
30183023 max_accepted_htlcs,
3024+ channel_reserve_satoshis,
30193025 funding_pubkey,
30203026 revocation_basepoint,
30213027 payment_basepoint,
@@ -3072,6 +3078,7 @@ impl LengthReadable for OpenChannelV2 {
30723078 let dust_limit_satoshis: u64 = Readable :: read ( r) ?;
30733079 let max_htlc_value_in_flight_msat: u64 = Readable :: read ( r) ?;
30743080 let htlc_minimum_msat: u64 = Readable :: read ( r) ?;
3081+ let channel_reserve_satoshis: u64 = Readable :: read ( r) ?;
30753082 let to_self_delay: u16 = Readable :: read ( r) ?;
30763083 let max_accepted_htlcs: u16 = Readable :: read ( r) ?;
30773084 let locktime: u32 = Readable :: read ( r) ?;
@@ -3103,6 +3110,7 @@ impl LengthReadable for OpenChannelV2 {
31033110 commitment_feerate_sat_per_1000_weight,
31043111 to_self_delay,
31053112 max_accepted_htlcs,
3113+ channel_reserve_satoshis,
31063114 funding_pubkey,
31073115 revocation_basepoint,
31083116 payment_basepoint,
@@ -4708,6 +4716,7 @@ mod tests {
47084716 commitment_feerate_sat_per_1000_weight : 821716 ,
47094717 to_self_delay : 49340 ,
47104718 max_accepted_htlcs : 49340 ,
4719+ channel_reserve_satoshis : 8665828695742877976 ,
47114720 funding_pubkey : pubkey_1,
47124721 revocation_basepoint : pubkey_2,
47134722 payment_basepoint : pubkey_3,
@@ -4816,6 +4825,7 @@ mod tests {
48164825 htlc_minimum_msat : 2316138423780173 ,
48174826 to_self_delay : 49340 ,
48184827 max_accepted_htlcs : 49340 ,
4828+ channel_reserve_satoshis : 8665828695742877976 ,
48194829 funding_pubkey : pubkey_1,
48204830 revocation_basepoint : pubkey_2,
48214831 payment_basepoint : pubkey_3,
0 commit comments