Skip to content

Commit 5b580a3

Browse files
committed
f Rename SweeperBalance and sweeper_balances
1 parent 97bbbe0 commit 5b580a3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

bindings/ldk_node.udl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ interface LightningBalance {
251251
};
252252

253253
[Enum]
254-
interface SweeperBalance {
254+
interface PendingSweepBalance {
255255
PendingBroadcast ( ChannelId? channel_id, u64 amount_satoshis );
256256
BroadcastAwaitingConfirmation ( ChannelId? channel_id, u32 latest_broadcast_height, Txid latest_spending_txid, u64 amount_satoshis );
257257
AwaitingThresholdConfirmations ( ChannelId? channel_id, Txid latest_spending_txid, BlockHash confirmation_hash, u32 confirmation_height, u64 amount_satoshis);
@@ -262,7 +262,7 @@ dictionary BalanceDetails {
262262
u64 spendable_onchain_balance_sats;
263263
u64 total_lightning_balance_sats;
264264
sequence<LightningBalance> lightning_balances;
265-
sequence<SweeperBalance> sweeper_balances;
265+
sequence<PendingSweepBalance> pending_balances_from_channel_closures;
266266
};
267267

268268
interface ChannelConfig {

src/balance.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub struct BalanceDetails {
4545
///
4646
/// Note that, depending on the sync status of the wallets, swept balances listed here might or
4747
/// might not already be accounted for in [`Self::total_onchain_balance_sats`].
48-
pub sweeper_balances: Vec<SweeperBalance>,
48+
pub pending_balances_from_channel_closures: Vec<PendingSweepBalance>,
4949
}
5050

5151
/// Details about the status of a known Lightning balance.
@@ -215,7 +215,7 @@ impl LightningBalance {
215215

216216
/// Details about the status of a known balance currently being swept to our on-chain wallet.
217217
#[derive(Debug, Clone)]
218-
pub enum SweeperBalance {
218+
pub enum PendingSweepBalance {
219219
/// The spendable output is about to be swept, but a spending transaction has yet to be generated and
220220
/// broadcast.
221221
PendingBroadcast {
@@ -255,7 +255,7 @@ pub enum SweeperBalance {
255255
},
256256
}
257257

258-
impl SweeperBalance {
258+
impl PendingSweepBalance {
259259
pub(crate) fn from_tracked_spendable_output(output_info: SpendableOutputInfo) -> Self {
260260
if let Some(confirmation_hash) = output_info.confirmation_hash {
261261
debug_assert!(output_info.confirmation_height.is_some());

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub use bitcoin;
100100
pub use lightning;
101101
pub use lightning_invoice;
102102

103-
pub use balance::{BalanceDetails, LightningBalance, SweeperBalance};
103+
pub use balance::{BalanceDetails, LightningBalance, PendingSweepBalance};
104104
pub use error::Error as NodeError;
105105
use error::Error;
106106

@@ -1774,19 +1774,19 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
17741774
}
17751775
}
17761776

1777-
let sweeper_balances = self
1777+
let pending_balances_from_channel_closures = self
17781778
.output_sweeper
17791779
.tracked_spendable_outputs()
17801780
.into_iter()
1781-
.map(|o| SweeperBalance::from_tracked_spendable_output(o))
1781+
.map(|o| PendingSweepBalance::from_tracked_spendable_output(o))
17821782
.collect();
17831783

17841784
BalanceDetails {
17851785
total_onchain_balance_sats,
17861786
spendable_onchain_balance_sats,
17871787
total_lightning_balance_sats,
17881788
lightning_balances,
1789-
sweeper_balances,
1789+
pending_balances_from_channel_closures,
17901790
}
17911791
}
17921792

0 commit comments

Comments
 (0)