@@ -1118,6 +1118,10 @@ pub struct ChannelDetails {
11181118 /// inbound. This may be zero for inbound channels serialized with LDK versions prior to
11191119 /// 0.0.113.
11201120 pub user_channel_id : u128 ,
1121+ /// The currently negotiated feerate per 1000-weight-unit applied to commitment and htlc txs
1122+ ///
1123+ /// This value will be `None` for objects serialized with LDK versions prior to 0.0.115.
1124+ pub feerate_per_kw : Option < u32 > ,
11211125 /// Our total balance. This is the amount we would get if we close the channel.
11221126 /// This value is not exact. Due to various in-flight changes and feerate changes, exactly this
11231127 /// amount is not likely to be recoverable on close.
@@ -1260,6 +1264,7 @@ impl ChannelDetails {
12601264 outbound_scid_alias : if channel. is_usable ( ) { Some ( channel. outbound_scid_alias ( ) ) } else { None } ,
12611265 inbound_scid_alias : channel. latest_inbound_scid_alias ( ) ,
12621266 channel_value_satoshis : channel. get_value_satoshis ( ) ,
1267+ feerate_per_kw : Some ( channel. get_feerate ( ) ) ,
12631268 unspendable_punishment_reserve : to_self_reserve_satoshis,
12641269 balance_msat : balance. balance_msat ,
12651270 inbound_capacity_msat : balance. inbound_capacity_msat ,
@@ -6570,6 +6575,7 @@ impl Writeable for ChannelDetails {
65706575 ( 33 , self . inbound_htlc_minimum_msat, option) ,
65716576 ( 35 , self . inbound_htlc_maximum_msat, option) ,
65726577 ( 37 , user_channel_id_high_opt, option) ,
6578+ ( 39 , self . feerate_per_kw, option) ,
65736579 } ) ;
65746580 Ok ( ( ) )
65756581 }
@@ -6605,6 +6611,7 @@ impl Readable for ChannelDetails {
66056611 ( 33 , inbound_htlc_minimum_msat, option) ,
66066612 ( 35 , inbound_htlc_maximum_msat, option) ,
66076613 ( 37 , user_channel_id_high_opt, option) ,
6614+ ( 39 , feerate_per_kw, option) ,
66086615 } ) ;
66096616
66106617 // `user_channel_id` used to be a single u64 value. In order to remain backwards compatible with
@@ -6638,6 +6645,7 @@ impl Readable for ChannelDetails {
66386645 is_public : is_public. 0 . unwrap ( ) ,
66396646 inbound_htlc_minimum_msat,
66406647 inbound_htlc_maximum_msat,
6648+ feerate_per_kw,
66416649 } )
66426650 }
66436651}
0 commit comments