Skip to content

Commit 1a893e7

Browse files
committed
f Rename SweeperBalance and sweeper_balances
1 parent 4b1c34b commit 1a893e7

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
@@ -237,7 +237,7 @@ interface LightningBalance {
237237
};
238238

239239
[Enum]
240-
interface SweeperBalance {
240+
interface PendingSweepBalance {
241241
PendingBroadcast ( ChannelId? channel_id, u64 amount_satoshis );
242242
BroadcastAwaitingConfirmation ( ChannelId? channel_id, u32 latest_broadcast_height, Txid latest_spending_txid, u64 amount_satoshis );
243243
AwaitingThresholdConfirmations ( ChannelId? channel_id, Txid latest_spending_txid, BlockHash confirmation_hash, u32 confirmation_height, u64 amount_satoshis);
@@ -248,7 +248,7 @@ dictionary BalanceDetails {
248248
u64 spendable_onchain_balance_sats;
249249
u64 total_lightning_balance_sats;
250250
sequence<LightningBalance> lightning_balances;
251-
sequence<SweeperBalance> sweeper_balances;
251+
sequence<PendingSweepBalance> pending_balances_from_channel_closures;
252252
};
253253

254254
interface ChannelConfig {

src/balance.rs

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

4242
/// Details about the status of a known Lightning balance.
@@ -206,7 +206,7 @@ impl LightningBalance {
206206

207207
/// Details about the status of a known balance currently being swept to our on-chain wallet.
208208
#[derive(Debug, Clone)]
209-
pub enum SweeperBalance {
209+
pub enum PendingSweepBalance {
210210
/// The spendable output is about to be swept, but a spending transaction has yet to be generated and
211211
/// broadcast.
212212
PendingBroadcast {
@@ -246,7 +246,7 @@ pub enum SweeperBalance {
246246
},
247247
}
248248

249-
impl SweeperBalance {
249+
impl PendingSweepBalance {
250250
pub(crate) fn from_tracked_spendable_output(output_info: SpendableOutputInfo) -> Self {
251251
if let Some(confirmation_hash) = output_info.confirmation_hash {
252252
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
@@ -98,7 +98,7 @@ pub use bitcoin;
9898
pub use lightning;
9999
pub use lightning_invoice;
100100

101-
pub use balance::{BalanceDetails, LightningBalance, SweeperBalance};
101+
pub use balance::{BalanceDetails, LightningBalance, PendingSweepBalance};
102102
pub use error::Error as NodeError;
103103
use error::Error;
104104

@@ -1591,19 +1591,19 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
15911591
}
15921592
}
15931593

1594-
let sweeper_balances = self
1594+
let pending_balances_from_channel_closures = self
15951595
.output_sweeper
15961596
.tracked_spendable_outputs()
15971597
.into_iter()
1598-
.map(|o| SweeperBalance::from_tracked_spendable_output(o))
1598+
.map(|o| PendingSweepBalance::from_tracked_spendable_output(o))
15991599
.collect();
16001600

16011601
BalanceDetails {
16021602
total_onchain_balance_sats,
16031603
spendable_onchain_balance_sats,
16041604
total_lightning_balance_sats,
16051605
lightning_balances,
1606-
sweeper_balances,
1606+
pending_balances_from_channel_closures,
16071607
}
16081608
}
16091609

0 commit comments

Comments
 (0)