Expose current dust exposure in ChannelDetails#4470
Expose current dust exposure in ChannelDetails#4470Bortlesboat wants to merge 1 commit intolightningdevkit:mainfrom
Conversation
|
👋 Thanks for assigning @tankyleo as a reviewer! |
06585ba to
c571ad4
Compare
c571ad4 to
4f9b1e5
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4470 +/- ##
==========================================
+ Coverage 85.98% 86.01% +0.02%
==========================================
Files 159 159
Lines 105415 105424 +9
Branches 105415 105424 +9
==========================================
+ Hits 90643 90679 +36
+ Misses 12255 12235 -20
+ Partials 2517 2510 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
🔔 1st Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
Quick follow-up from my side: I’m treating review-required PRs as top priority this week. If you want any specific changes, rebase, or split, I can turn them around quickly. |
Add current_dust_exposure_msat field to ChannelDetails that surfaces the total dust exposure including both dust HTLC values and the commitment transaction fee component. This is the maximum of the holder and counterparty commitment transaction dust exposures. Users can compare this value against max_dust_htlc_exposure in ChannelConfig to understand how close a channel is to its dust exposure limit without needing internal channel access. Fixes lightningdevkit#2264
4f9b1e5 to
03c307d
Compare
Summary
Adds a
current_dust_exposure_msatfield toChannelDetailsthat surfaces the current total dust exposure on a channel.ChannelConfig::max_dust_htlc_exposureto monitor how close a channel is to its dust limitOption<u64>,Nonefor objects serialized prior to 0.2.1Implementation
dust_exposure_msattoAvailableBalances— computed asmax(local_dust_exposure_msat, remote_dust_exposure_msat)inget_available_balances(tx_builder.rs)current_dust_exposure_msat: Option<u64>toChannelDetailsstruct, populated from the balance computation infrom_channelFixes #2264