@@ -1118,6 +1118,10 @@ pub struct ChannelDetails {
1118
1118
/// inbound. This may be zero for inbound channels serialized with LDK versions prior to
1119
1119
/// 0.0.113.
1120
1120
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 > ,
1121
1125
/// Our total balance. This is the amount we would get if we close the channel.
1122
1126
/// This value is not exact. Due to various in-flight changes and feerate changes, exactly this
1123
1127
/// amount is not likely to be recoverable on close.
@@ -1260,6 +1264,7 @@ impl ChannelDetails {
1260
1264
outbound_scid_alias : if channel. is_usable ( ) { Some ( channel. outbound_scid_alias ( ) ) } else { None } ,
1261
1265
inbound_scid_alias : channel. latest_inbound_scid_alias ( ) ,
1262
1266
channel_value_satoshis : channel. get_value_satoshis ( ) ,
1267
+ feerate_per_kw : Some ( channel. get_feerate ( ) ) ,
1263
1268
unspendable_punishment_reserve : to_self_reserve_satoshis,
1264
1269
balance_msat : balance. balance_msat ,
1265
1270
inbound_capacity_msat : balance. inbound_capacity_msat ,
@@ -6570,6 +6575,7 @@ impl Writeable for ChannelDetails {
6570
6575
( 33 , self . inbound_htlc_minimum_msat, option) ,
6571
6576
( 35 , self . inbound_htlc_maximum_msat, option) ,
6572
6577
( 37 , user_channel_id_high_opt, option) ,
6578
+ ( 39 , self . feerate_per_kw, option) ,
6573
6579
} ) ;
6574
6580
Ok ( ( ) )
6575
6581
}
@@ -6605,6 +6611,7 @@ impl Readable for ChannelDetails {
6605
6611
( 33 , inbound_htlc_minimum_msat, option) ,
6606
6612
( 35 , inbound_htlc_maximum_msat, option) ,
6607
6613
( 37 , user_channel_id_high_opt, option) ,
6614
+ ( 39 , feerate_per_kw, option) ,
6608
6615
} ) ;
6609
6616
6610
6617
// `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 {
6638
6645
is_public : is_public. 0 . unwrap ( ) ,
6639
6646
inbound_htlc_minimum_msat,
6640
6647
inbound_htlc_maximum_msat,
6648
+ feerate_per_kw,
6641
6649
} )
6642
6650
}
6643
6651
}
0 commit comments