Skip to content

Commit a46048e

Browse files
committed
Account for OutputSweeper behavioral changes in LDK v0.1.1
LDK v0.1.1 shipped slight behavioral changes to the `OutputSweeper`: spendable outputs are now tracked much longer before getting pruned. Here, we update our tests and docs to account for these changes.
1 parent 3b36020 commit a46048e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/balance.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ pub enum PendingSweepBalance {
325325
},
326326
/// A spending transaction has been confirmed on-chain and is awaiting threshold confirmations.
327327
///
328-
/// It will be considered irrevocably confirmed after reaching [`ANTI_REORG_DELAY`].
328+
/// It will be pruned after reaching [`PRUNE_DELAY_BLOCKS`] confirmations.
329329
///
330-
/// [`ANTI_REORG_DELAY`]: lightning::chain::channelmonitor::ANTI_REORG_DELAY
330+
/// [`PRUNE_DELAY_BLOCKS`]: lightning::util::sweep::PRUNE_DELAY_BLOCKS
331331
AwaitingThresholdConfirmations {
332332
/// The identifier of the channel this balance belongs to.
333333
channel_id: Option<ChannelId>,

tests/common/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ pub(crate) fn do_channel_full_cycle<E: ElectrumApi>(
935935
node_a.sync_wallets().unwrap();
936936

937937
assert!(node_b.list_balances().lightning_balances.is_empty());
938-
assert!(node_b.list_balances().pending_balances_from_channel_closures.is_empty());
938+
assert_eq!(node_b.list_balances().pending_balances_from_channel_closures.len(), 1);
939939

940940
// Check node_a properly sees all balances and sweeps them.
941941
assert_eq!(node_a.list_balances().lightning_balances.len(), 1);

0 commit comments

Comments
 (0)