Skip to content

Commit 6b1f2ff

Browse files
committed
Expose feerate in ChannelDetails
1 parent 2587e2d commit 6b1f2ff

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
@@ -141,6 +141,7 @@ dictionary ChannelDetails {
141141
u64 channel_value_satoshis;
142142
u64? unspendable_punishment_reserve;
143143
UserChannelId user_channel_id;
144+
u32 feerate_sat_per_1000_weight;
144145
u64 balance_msat;
145146
u64 outbound_capacity_msat;
146147
u64 inbound_capacity_msat;

src/types.rs

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

0 commit comments

Comments
 (0)