Skip to content

Commit 5fca28e

Browse files
committed
Expose feerate in ChannelDetails
1 parent f4d3ca8 commit 5fca28e

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
@@ -155,6 +155,7 @@ dictionary ChannelDetails {
155155
u64 channel_value_satoshis;
156156
u64? unspendable_punishment_reserve;
157157
UserChannelId user_channel_id;
158+
u32 feerate_sat_per_1000_weight;
158159
u64 balance_msat;
159160
u64 outbound_capacity_msat;
160161
u64 inbound_capacity_msat;

src/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ pub struct ChannelDetails {
159159
pub unspendable_punishment_reserve: Option<u64>,
160160
/// The local `user_channel_id` of this channel.
161161
pub user_channel_id: UserChannelId,
162+
/// The currently negotiated fee rate denominated in satoshi per 1000 weight units,
163+
/// which is applied to commitment and HTLC transactions.
164+
pub feerate_sat_per_1000_weight: u32,
162165
/// Total balance of the channel. This is the amount that will be returned to the user if the
163166
/// channel is closed.
164167
///
@@ -214,6 +217,7 @@ impl From<LdkChannelDetails> for ChannelDetails {
214217
unspendable_punishment_reserve: value.unspendable_punishment_reserve,
215218
user_channel_id: UserChannelId(value.user_channel_id),
216219
balance_msat: value.balance_msat,
220+
feerate_sat_per_1000_weight: value.feerate_sat_per_1000_weight.unwrap(),
217221
outbound_capacity_msat: value.outbound_capacity_msat,
218222
inbound_capacity_msat: value.inbound_capacity_msat,
219223
confirmations_required: value.confirmations_required,

0 commit comments

Comments
 (0)