@@ -36,8 +36,10 @@ use lightning::onion_message::messenger::AOnionMessenger;
36
36
use lightning:: routing:: gossip:: { NetworkGraph , P2PGossipSync } ;
37
37
use lightning:: routing:: scoring:: { ScoreUpdate , WriteableScore } ;
38
38
use lightning:: routing:: utxo:: UtxoLookup ;
39
+ use lightning:: sign:: { ChangeDestinationSource , OutputSpender } ;
39
40
use lightning:: util:: logger:: Logger ;
40
- use lightning:: util:: persist:: Persister ;
41
+ use lightning:: util:: persist:: { KVStore , Persister } ;
42
+ use lightning:: util:: sweep:: OutputSweeper ;
41
43
#[ cfg( feature = "std" ) ]
42
44
use lightning:: util:: wakers:: Sleeper ;
43
45
use lightning_rapid_gossip_sync:: RapidGossipSync ;
@@ -132,6 +134,11 @@ const REBROADCAST_TIMER: u64 = 30;
132
134
#[ cfg( test) ]
133
135
const REBROADCAST_TIMER : u64 = 1 ;
134
136
137
+ #[ cfg( not( test) ) ]
138
+ const SWEEPER_TIMER : u64 = 30 ;
139
+ #[ cfg( test) ]
140
+ const SWEEPER_TIMER : u64 = 1 ;
141
+
135
142
#[ cfg( feature = "futures" ) ]
136
143
/// core::cmp::min is not currently const, so we define a trivial (and equivalent) replacement
137
144
const fn min_u64 ( a : u64 , b : u64 ) -> u64 {
@@ -308,6 +315,7 @@ macro_rules! define_run_body {
308
315
$channel_manager: ident, $process_channel_manager_events: expr,
309
316
$onion_messenger: ident, $process_onion_message_handler_events: expr,
310
317
$peer_manager: ident, $gossip_sync: ident,
318
+ $process_sweeper: expr,
311
319
$logger: ident, $scorer: ident, $loop_exit_check: expr, $await: expr, $get_timer: expr,
312
320
$timer_elapsed: expr, $check_slow_await: expr, $time_fetch: expr,
313
321
) => { {
@@ -322,6 +330,7 @@ macro_rules! define_run_body {
322
330
let mut last_prune_call = $get_timer( FIRST_NETWORK_PRUNE_TIMER ) ;
323
331
let mut last_scorer_persist_call = $get_timer( SCORER_PERSIST_TIMER ) ;
324
332
let mut last_rebroadcast_call = $get_timer( REBROADCAST_TIMER ) ;
333
+ let mut last_sweeper_call = $get_timer( SWEEPER_TIMER ) ;
325
334
let mut have_pruned = false ;
326
335
let mut have_decayed_scorer = false ;
327
336
@@ -465,6 +474,12 @@ macro_rules! define_run_body {
465
474
$chain_monitor. rebroadcast_pending_claims( ) ;
466
475
last_rebroadcast_call = $get_timer( REBROADCAST_TIMER ) ;
467
476
}
477
+
478
+ if $timer_elapsed( & mut last_sweeper_call, SWEEPER_TIMER ) {
479
+ log_trace!( $logger, "Regenerating sweeper spends if necessary" ) ;
480
+ let _ = $process_sweeper;
481
+ last_sweeper_call = $get_timer( SWEEPER_TIMER ) ;
482
+ }
468
483
}
469
484
470
485
// After we exit, ensure we persist the ChannelManager one final time - this avoids
@@ -627,6 +642,7 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
627
642
/// ```
628
643
/// # use lightning::io;
629
644
/// # use lightning::events::ReplayEvent;
645
+ /// # use lightning::util::sweep::OutputSweeper;
630
646
/// # use std::sync::{Arc, RwLock};
631
647
/// # use std::sync::atomic::{AtomicBool, Ordering};
632
648
/// # use std::time::SystemTime;
@@ -666,6 +682,9 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
666
682
/// # F: lightning::chain::Filter + Send + Sync + 'static,
667
683
/// # FE: lightning::chain::chaininterface::FeeEstimator + Send + Sync + 'static,
668
684
/// # UL: lightning::routing::utxo::UtxoLookup + Send + Sync + 'static,
685
+ /// # D: lightning::sign::ChangeDestinationSource + Send + Sync + 'static,
686
+ /// # K: lightning::util::persist::KVStore + Send + Sync + 'static,
687
+ /// # O: lightning::sign::OutputSpender + Send + Sync + 'static,
669
688
/// # > {
670
689
/// # peer_manager: Arc<PeerManager<B, F, FE, UL>>,
671
690
/// # event_handler: Arc<EventHandler>,
@@ -677,14 +696,18 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
677
696
/// # persister: Arc<Store>,
678
697
/// # logger: Arc<Logger>,
679
698
/// # scorer: Arc<Scorer>,
699
+ /// # sweeper: Arc<OutputSweeper<Arc<B>, Arc<D>, Arc<FE>, Arc<F>, Arc<K>, Arc<Logger>, Arc<O>>>,
680
700
/// # }
681
701
/// #
682
702
/// # async fn setup_background_processing<
683
703
/// # B: lightning::chain::chaininterface::BroadcasterInterface + Send + Sync + 'static,
684
704
/// # F: lightning::chain::Filter + Send + Sync + 'static,
685
705
/// # FE: lightning::chain::chaininterface::FeeEstimator + Send + Sync + 'static,
686
706
/// # UL: lightning::routing::utxo::UtxoLookup + Send + Sync + 'static,
687
- /// # >(node: Node<B, F, FE, UL>) {
707
+ /// # D: lightning::sign::ChangeDestinationSource + Send + Sync + 'static,
708
+ /// # K: lightning::util::persist::KVStore + Send + Sync + 'static,
709
+ /// # O: lightning::sign::OutputSpender + Send + Sync + 'static,
710
+ /// # >(node: Node<B, F, FE, UL, D, K, O>) {
688
711
/// let background_persister = Arc::clone(&node.persister);
689
712
/// let background_event_handler = Arc::clone(&node.event_handler);
690
713
/// let background_chain_mon = Arc::clone(&node.chain_monitor);
@@ -695,7 +718,7 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
695
718
/// let background_liquidity_manager = Arc::clone(&node.liquidity_manager);
696
719
/// let background_logger = Arc::clone(&node.logger);
697
720
/// let background_scorer = Arc::clone(&node.scorer);
698
- ///
721
+ /// let background_sweeper = Arc::clone(&node.sweeper);
699
722
/// // Setup the sleeper.
700
723
#[ cfg_attr(
701
724
feature = "std" ,
@@ -729,6 +752,7 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
729
752
/// background_gossip_sync,
730
753
/// background_peer_man,
731
754
/// Some(background_liquidity_manager),
755
+ /// Some(background_sweeper),
732
756
/// background_logger,
733
757
/// Some(background_scorer),
734
758
/// sleeper,
@@ -767,6 +791,10 @@ pub async fn process_events_async<
767
791
RGS : ' static + Deref < Target = RapidGossipSync < G , L > > ,
768
792
PM : ' static + Deref ,
769
793
LM : ' static + Deref ,
794
+ D : ' static + Deref ,
795
+ O : ' static + Deref ,
796
+ K : ' static + Deref ,
797
+ OS : ' static + Deref < Target = OutputSweeper < T , D , F , CF , K , L , O > > ,
770
798
S : ' static + Deref < Target = SC > + Send + Sync ,
771
799
SC : for < ' b > WriteableScore < ' b > ,
772
800
SleepFuture : core:: future:: Future < Output = bool > + core:: marker:: Unpin ,
@@ -775,12 +803,12 @@ pub async fn process_events_async<
775
803
> (
776
804
persister : PS , event_handler : EventHandler , chain_monitor : M , channel_manager : CM ,
777
805
onion_messenger : Option < OM > , gossip_sync : GossipSync < PGS , RGS , G , UL , L > , peer_manager : PM ,
778
- liquidity_manager : Option < LM > , logger : L , scorer : Option < S > , sleeper : Sleeper ,
779
- mobile_interruptable_platform : bool , fetch_time : FetchTime ,
806
+ liquidity_manager : Option < LM > , sweeper : Option < OS > , logger : L , scorer : Option < S > ,
807
+ sleeper : Sleeper , mobile_interruptable_platform : bool , fetch_time : FetchTime ,
780
808
) -> Result < ( ) , lightning:: io:: Error >
781
809
where
782
810
UL :: Target : ' static + UtxoLookup ,
783
- CF :: Target : ' static + chain:: Filter ,
811
+ CF :: Target : ' static + chain:: Filter + Sync + Send ,
784
812
T :: Target : ' static + BroadcasterInterface ,
785
813
F :: Target : ' static + FeeEstimator ,
786
814
L :: Target : ' static + Logger ,
@@ -790,6 +818,9 @@ where
790
818
OM :: Target : AOnionMessenger ,
791
819
PM :: Target : APeerManager ,
792
820
LM :: Target : ALiquidityManager ,
821
+ O :: Target : ' static + OutputSpender ,
822
+ D :: Target : ' static + ChangeDestinationSource ,
823
+ K :: Target : ' static + KVStore ,
793
824
{
794
825
let mut should_break = false ;
795
826
let async_event_handler = |event| {
@@ -833,6 +864,13 @@ where
833
864
} ,
834
865
peer_manager,
835
866
gossip_sync,
867
+ {
868
+ if let Some ( ref sweeper) = sweeper {
869
+ sweeper. regenerate_and_broadcast_spend_if_necessary( )
870
+ } else {
871
+ Ok ( ( ) )
872
+ }
873
+ } ,
836
874
logger,
837
875
scorer,
838
876
should_break,
@@ -953,14 +991,18 @@ impl BackgroundProcessor {
953
991
LM : ' static + Deref + Send ,
954
992
S : ' static + Deref < Target = SC > + Send + Sync ,
955
993
SC : for < ' b > WriteableScore < ' b > ,
994
+ D : ' static + Deref ,
995
+ O : ' static + Deref ,
996
+ K : ' static + Deref ,
997
+ OS : ' static + Deref < Target = OutputSweeper < T , D , F , CF , K , L , O > > + Send + Sync ,
956
998
> (
957
999
persister : PS , event_handler : EH , chain_monitor : M , channel_manager : CM ,
958
1000
onion_messenger : Option < OM > , gossip_sync : GossipSync < PGS , RGS , G , UL , L > , peer_manager : PM ,
959
- liquidity_manager : Option < LM > , logger : L , scorer : Option < S > ,
1001
+ liquidity_manager : Option < LM > , sweeper : Option < OS > , logger : L , scorer : Option < S > ,
960
1002
) -> Self
961
1003
where
962
1004
UL :: Target : ' static + UtxoLookup ,
963
- CF :: Target : ' static + chain:: Filter ,
1005
+ CF :: Target : ' static + chain:: Filter + Sync + Send ,
964
1006
T :: Target : ' static + BroadcasterInterface ,
965
1007
F :: Target : ' static + FeeEstimator ,
966
1008
L :: Target : ' static + Logger ,
@@ -970,6 +1012,9 @@ impl BackgroundProcessor {
970
1012
OM :: Target : AOnionMessenger ,
971
1013
PM :: Target : APeerManager ,
972
1014
LM :: Target : ALiquidityManager ,
1015
+ O :: Target : ' static + OutputSpender ,
1016
+ D :: Target : ' static + ChangeDestinationSource ,
1017
+ K :: Target : ' static + KVStore ,
973
1018
{
974
1019
let stop_thread = Arc :: new ( AtomicBool :: new ( false ) ) ;
975
1020
let stop_thread_clone = stop_thread. clone ( ) ;
@@ -1005,6 +1050,13 @@ impl BackgroundProcessor {
1005
1050
} ,
1006
1051
peer_manager,
1007
1052
gossip_sync,
1053
+ {
1054
+ if let Some ( ref sweeper) = sweeper {
1055
+ sweeper. regenerate_and_broadcast_spend_if_necessary( )
1056
+ } else {
1057
+ Ok ( ( ) )
1058
+ }
1059
+ } ,
1008
1060
logger,
1009
1061
scorer,
1010
1062
stop_thread. load( Ordering :: Acquire ) ,
@@ -1269,7 +1321,7 @@ mod tests {
1269
1321
Arc < test_utils:: TestBroadcaster > ,
1270
1322
Arc < TestWallet > ,
1271
1323
Arc < test_utils:: TestFeeEstimator > ,
1272
- Arc < dyn Filter + Sync + Send > ,
1324
+ Arc < test_utils :: TestChainSource > ,
1273
1325
Arc < FilesystemStore > ,
1274
1326
Arc < test_utils:: TestLogger > ,
1275
1327
Arc < KeysManager > ,
@@ -1648,7 +1700,7 @@ mod tests {
1648
1700
best_block,
1649
1701
Arc :: clone ( & tx_broadcaster) ,
1650
1702
Arc :: clone ( & fee_estimator) ,
1651
- None :: < Arc < dyn Filter + Sync + Send > > ,
1703
+ None :: < Arc < test_utils :: TestChainSource > > ,
1652
1704
Arc :: clone ( & keys_manager) ,
1653
1705
wallet,
1654
1706
Arc :: clone ( & kv_store) ,
@@ -1888,6 +1940,7 @@ mod tests {
1888
1940
nodes[ 0 ] . p2p_gossip_sync ( ) ,
1889
1941
nodes[ 0 ] . peer_manager . clone ( ) ,
1890
1942
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
1943
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
1891
1944
nodes[ 0 ] . logger . clone ( ) ,
1892
1945
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
1893
1946
) ;
@@ -1982,6 +2035,7 @@ mod tests {
1982
2035
nodes[ 0 ] . no_gossip_sync ( ) ,
1983
2036
nodes[ 0 ] . peer_manager . clone ( ) ,
1984
2037
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2038
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
1985
2039
nodes[ 0 ] . logger . clone ( ) ,
1986
2040
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
1987
2041
) ;
@@ -2025,6 +2079,7 @@ mod tests {
2025
2079
nodes[ 0 ] . no_gossip_sync ( ) ,
2026
2080
nodes[ 0 ] . peer_manager . clone ( ) ,
2027
2081
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2082
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2028
2083
nodes[ 0 ] . logger . clone ( ) ,
2029
2084
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2030
2085
) ;
@@ -2058,6 +2113,7 @@ mod tests {
2058
2113
nodes[ 0 ] . rapid_gossip_sync ( ) ,
2059
2114
nodes[ 0 ] . peer_manager . clone ( ) ,
2060
2115
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2116
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2061
2117
nodes[ 0 ] . logger . clone ( ) ,
2062
2118
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2063
2119
move |dur : Duration | {
@@ -2095,6 +2151,7 @@ mod tests {
2095
2151
nodes[ 0 ] . p2p_gossip_sync ( ) ,
2096
2152
nodes[ 0 ] . peer_manager . clone ( ) ,
2097
2153
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2154
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2098
2155
nodes[ 0 ] . logger . clone ( ) ,
2099
2156
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2100
2157
) ;
@@ -2125,6 +2182,7 @@ mod tests {
2125
2182
nodes[ 0 ] . no_gossip_sync ( ) ,
2126
2183
nodes[ 0 ] . peer_manager . clone ( ) ,
2127
2184
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2185
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2128
2186
nodes[ 0 ] . logger . clone ( ) ,
2129
2187
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2130
2188
) ;
@@ -2172,6 +2230,7 @@ mod tests {
2172
2230
nodes[ 0 ] . no_gossip_sync ( ) ,
2173
2231
nodes[ 0 ] . peer_manager . clone ( ) ,
2174
2232
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2233
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2175
2234
nodes[ 0 ] . logger . clone ( ) ,
2176
2235
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2177
2236
) ;
@@ -2235,6 +2294,7 @@ mod tests {
2235
2294
nodes[ 0 ] . no_gossip_sync ( ) ,
2236
2295
nodes[ 0 ] . peer_manager . clone ( ) ,
2237
2296
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2297
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2238
2298
nodes[ 0 ] . logger . clone ( ) ,
2239
2299
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2240
2300
) ;
@@ -2280,10 +2340,22 @@ mod tests {
2280
2340
2281
2341
advance_chain ( & mut nodes[ 0 ] , 3 ) ;
2282
2342
2343
+ let tx_broadcaster = nodes[ 0 ] . tx_broadcaster . clone ( ) ;
2344
+ let wait_for_sweep_tx = || -> Transaction {
2345
+ loop {
2346
+ let sweep_tx = tx_broadcaster. txn_broadcasted . lock ( ) . unwrap ( ) . pop ( ) ;
2347
+ if let Some ( sweep_tx) = sweep_tx {
2348
+ return sweep_tx;
2349
+ }
2350
+
2351
+ std:: thread:: sleep ( Duration :: from_millis ( 10 ) ) ;
2352
+ }
2353
+ } ;
2354
+
2283
2355
// Check we generate an initial sweeping tx.
2284
2356
assert_eq ! ( nodes[ 0 ] . sweeper. tracked_spendable_outputs( ) . len( ) , 1 ) ;
2357
+ let sweep_tx_0 = wait_for_sweep_tx ( ) ;
2285
2358
let tracked_output = nodes[ 0 ] . sweeper . tracked_spendable_outputs ( ) . first ( ) . unwrap ( ) . clone ( ) ;
2286
- let sweep_tx_0 = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . pop ( ) . unwrap ( ) ;
2287
2359
match tracked_output. status {
2288
2360
OutputSpendStatus :: PendingFirstConfirmation { latest_spending_tx, .. } => {
2289
2361
assert_eq ! ( sweep_tx_0. compute_txid( ) , latest_spending_tx. compute_txid( ) ) ;
@@ -2294,8 +2366,8 @@ mod tests {
2294
2366
// Check we regenerate and rebroadcast the sweeping tx each block.
2295
2367
advance_chain ( & mut nodes[ 0 ] , 1 ) ;
2296
2368
assert_eq ! ( nodes[ 0 ] . sweeper. tracked_spendable_outputs( ) . len( ) , 1 ) ;
2369
+ let sweep_tx_1 = wait_for_sweep_tx ( ) ;
2297
2370
let tracked_output = nodes[ 0 ] . sweeper . tracked_spendable_outputs ( ) . first ( ) . unwrap ( ) . clone ( ) ;
2298
- let sweep_tx_1 = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . pop ( ) . unwrap ( ) ;
2299
2371
match tracked_output. status {
2300
2372
OutputSpendStatus :: PendingFirstConfirmation { latest_spending_tx, .. } => {
2301
2373
assert_eq ! ( sweep_tx_1. compute_txid( ) , latest_spending_tx. compute_txid( ) ) ;
@@ -2306,8 +2378,8 @@ mod tests {
2306
2378
2307
2379
advance_chain ( & mut nodes[ 0 ] , 1 ) ;
2308
2380
assert_eq ! ( nodes[ 0 ] . sweeper. tracked_spendable_outputs( ) . len( ) , 1 ) ;
2381
+ let sweep_tx_2 = wait_for_sweep_tx ( ) ;
2309
2382
let tracked_output = nodes[ 0 ] . sweeper . tracked_spendable_outputs ( ) . first ( ) . unwrap ( ) . clone ( ) ;
2310
- let sweep_tx_2 = nodes[ 0 ] . tx_broadcaster . txn_broadcasted . lock ( ) . unwrap ( ) . pop ( ) . unwrap ( ) ;
2311
2383
match tracked_output. status {
2312
2384
OutputSpendStatus :: PendingFirstConfirmation { latest_spending_tx, .. } => {
2313
2385
assert_eq ! ( sweep_tx_2. compute_txid( ) , latest_spending_tx. compute_txid( ) ) ;
@@ -2387,6 +2459,7 @@ mod tests {
2387
2459
nodes[ 0 ] . no_gossip_sync ( ) ,
2388
2460
nodes[ 0 ] . peer_manager . clone ( ) ,
2389
2461
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2462
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2390
2463
nodes[ 0 ] . logger . clone ( ) ,
2391
2464
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2392
2465
) ;
@@ -2417,6 +2490,7 @@ mod tests {
2417
2490
nodes[ 0 ] . no_gossip_sync ( ) ,
2418
2491
nodes[ 0 ] . peer_manager . clone ( ) ,
2419
2492
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2493
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2420
2494
nodes[ 0 ] . logger . clone ( ) ,
2421
2495
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2422
2496
) ;
@@ -2513,6 +2587,7 @@ mod tests {
2513
2587
nodes[ 0 ] . rapid_gossip_sync ( ) ,
2514
2588
nodes[ 0 ] . peer_manager . clone ( ) ,
2515
2589
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2590
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2516
2591
nodes[ 0 ] . logger . clone ( ) ,
2517
2592
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2518
2593
) ;
@@ -2546,6 +2621,7 @@ mod tests {
2546
2621
nodes[ 0 ] . rapid_gossip_sync ( ) ,
2547
2622
nodes[ 0 ] . peer_manager . clone ( ) ,
2548
2623
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2624
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2549
2625
nodes[ 0 ] . logger . clone ( ) ,
2550
2626
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2551
2627
move |dur : Duration | {
@@ -2709,6 +2785,7 @@ mod tests {
2709
2785
nodes[ 0 ] . no_gossip_sync ( ) ,
2710
2786
nodes[ 0 ] . peer_manager . clone ( ) ,
2711
2787
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2788
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2712
2789
nodes[ 0 ] . logger . clone ( ) ,
2713
2790
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2714
2791
) ;
@@ -2760,6 +2837,7 @@ mod tests {
2760
2837
nodes[ 0 ] . no_gossip_sync ( ) ,
2761
2838
nodes[ 0 ] . peer_manager . clone ( ) ,
2762
2839
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2840
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2763
2841
nodes[ 0 ] . logger . clone ( ) ,
2764
2842
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2765
2843
move |dur : Duration | {
0 commit comments