Skip to content

Commit 65bb071

Browse files
committed
Expose feerate in ChannelDetails
1 parent 74c9ea2 commit 65bb071

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

bindings/ldk_node.udl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ dictionary ChannelDetails {
136136
u64 channel_value_satoshis;
137137
u64? unspendable_punishment_reserve;
138138
UserChannelId user_channel_id;
139+
u32 feerate_sat_per_1000_weight;
139140
u64 balance_msat;
140141
u64 outbound_capacity_msat;
141142
u64 inbound_capacity_msat;

src/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ pub struct ChannelDetails {
324324
pub unspendable_punishment_reserve: Option<u64>,
325325
/// The local `user_channel_id` of this channel.
326326
pub user_channel_id: UserChannelId,
327+
/// The currently negotiated fee rate denominated in satoshi per 1000 weight units,
328+
/// which is applied to commitment and HTLC transactions.
329+
pub feerate_sat_per_1000_weight: u32,
327330
/// Total balance of the channel. This is the amount that will be returned to the user if the
328331
/// channel is closed.
329332
///
@@ -379,6 +382,7 @@ impl From<LdkChannelDetails> for ChannelDetails {
379382
unspendable_punishment_reserve: value.unspendable_punishment_reserve,
380383
user_channel_id: UserChannelId(value.user_channel_id),
381384
balance_msat: value.balance_msat,
385+
feerate_sat_per_1000_weight: value.feerate_sat_per_1000_weight.unwrap(),
382386
outbound_capacity_msat: value.outbound_capacity_msat,
383387
inbound_capacity_msat: value.inbound_capacity_msat,
384388
confirmations_required: value.confirmations_required,

0 commit comments

Comments
 (0)