Skip to content

Commit a93b09a

Browse files
committed
f async
1 parent 2ee7db0 commit a93b09a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

lightning/src/sign/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,12 @@ pub trait ChangeDestinationSourceSync {
10001000
}
10011001

10021002
/// A wrapper around [`ChangeDestinationSource`] to allow for async calls.
1003+
#[cfg(any(test, feature = "_test_utils"))]
10031004
pub struct ChangeDestinationSourceSyncWrapper<T: Deref>(T)
1005+
where
1006+
T::Target: ChangeDestinationSourceSync;
1007+
#[cfg(not(any(test, feature = "_test_utils")))]
1008+
pub(crate) struct ChangeDestinationSourceSyncWrapper<T: Deref>(T)
10041009
where
10051010
T::Target: ChangeDestinationSourceSync;
10061011

lightning/src/util/sweep.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,8 @@ where
962962
Self { sweeper: Arc::new(sweeper) }
963963
}
964964

965-
/// Regenerates and broadcasts the spending transaction for any outputs that are pending
965+
/// Regenerates and broadcasts the spending transaction for any outputs that are pending. Wraps
966+
/// [`OutputSweeper::regenerate_and_broadcast_spend_if_necessary`].
966967
pub fn regenerate_and_broadcast_spend_if_necessary(&self) -> Result<(), ()> {
967968
let mut fut = Box::pin(self.sweeper.regenerate_and_broadcast_spend_if_necessary());
968969
let mut waker = dummy_waker();
@@ -976,7 +977,7 @@ where
976977
}
977978
}
978979

979-
/// Tells the sweeper to track the given outputs descriptors.
980+
/// Tells the sweeper to track the given outputs descriptors. Wraps [`OutputSweeper::track_spendable_outputs`].
980981
pub fn track_spendable_outputs(
981982
&self, output_descriptors: Vec<SpendableOutputDescriptor>, channel_id: Option<ChannelId>,
982983
exclude_static_outputs: bool, delay_until_height: Option<u32>,
@@ -989,13 +990,13 @@ where
989990
)
990991
}
991992

992-
/// Returns a list of the currently tracked spendable outputs.
993+
/// Returns a list of the currently tracked spendable outputs. Wraps [`OutputSweeper::tracked_spendable_outputs`].
993994
pub fn tracked_spendable_outputs(&self) -> Vec<TrackedSpendableOutput> {
994995
self.sweeper.tracked_spendable_outputs()
995996
}
996997

997998
/// Returns the inner async sweeper for testing purposes.
998-
// #[cfg(test)]
999+
#[cfg(any(test, feature = "_test_utils"))]
9991000
pub fn sweeper_async(
10001001
&self,
10011002
) -> Arc<OutputSweeper<B, Arc<ChangeDestinationSourceSyncWrapper<D>>, E, F, K, L, O>> {

0 commit comments

Comments
 (0)