@@ -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
+ $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,11 @@ where
833
864
} ,
834
865
peer_manager,
835
866
gossip_sync,
867
+ {
868
+ if let Some ( ref sweeper) = sweeper {
869
+ let _ = sweeper. regenerate_and_broadcast_spend_if_necessary( ) ;
870
+ }
871
+ } ,
836
872
logger,
837
873
scorer,
838
874
should_break,
@@ -953,14 +989,18 @@ impl BackgroundProcessor {
953
989
LM : ' static + Deref + Send ,
954
990
S : ' static + Deref < Target = SC > + Send + Sync ,
955
991
SC : for < ' b > WriteableScore < ' b > ,
992
+ D : ' static + Deref ,
993
+ O : ' static + Deref ,
994
+ K : ' static + Deref ,
995
+ OS : ' static + Deref < Target = OutputSweeper < T , D , F , CF , K , L , O > > + Send + Sync ,
956
996
> (
957
997
persister : PS , event_handler : EH , chain_monitor : M , channel_manager : CM ,
958
998
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 > ,
999
+ liquidity_manager : Option < LM > , sweeper : Option < OS > , logger : L , scorer : Option < S > ,
960
1000
) -> Self
961
1001
where
962
1002
UL :: Target : ' static + UtxoLookup ,
963
- CF :: Target : ' static + chain:: Filter ,
1003
+ CF :: Target : ' static + chain:: Filter + Sync + Send ,
964
1004
T :: Target : ' static + BroadcasterInterface ,
965
1005
F :: Target : ' static + FeeEstimator ,
966
1006
L :: Target : ' static + Logger ,
@@ -970,6 +1010,9 @@ impl BackgroundProcessor {
970
1010
OM :: Target : AOnionMessenger ,
971
1011
PM :: Target : APeerManager ,
972
1012
LM :: Target : ALiquidityManager ,
1013
+ O :: Target : ' static + OutputSpender ,
1014
+ D :: Target : ' static + ChangeDestinationSource ,
1015
+ K :: Target : ' static + KVStore ,
973
1016
{
974
1017
let stop_thread = Arc :: new ( AtomicBool :: new ( false ) ) ;
975
1018
let stop_thread_clone = stop_thread. clone ( ) ;
@@ -1005,6 +1048,11 @@ impl BackgroundProcessor {
1005
1048
} ,
1006
1049
peer_manager,
1007
1050
gossip_sync,
1051
+ {
1052
+ if let Some ( ref sweeper) = sweeper {
1053
+ let _ = sweeper. regenerate_and_broadcast_spend_if_necessary( ) ;
1054
+ }
1055
+ } ,
1008
1056
logger,
1009
1057
scorer,
1010
1058
stop_thread. load( Ordering :: Acquire ) ,
@@ -1269,7 +1317,7 @@ mod tests {
1269
1317
Arc < test_utils:: TestBroadcaster > ,
1270
1318
Arc < TestWallet > ,
1271
1319
Arc < test_utils:: TestFeeEstimator > ,
1272
- Arc < dyn Filter + Sync + Send > ,
1320
+ Arc < test_utils :: TestChainSource > ,
1273
1321
Arc < FilesystemStore > ,
1274
1322
Arc < test_utils:: TestLogger > ,
1275
1323
Arc < KeysManager > ,
@@ -1648,7 +1696,7 @@ mod tests {
1648
1696
best_block,
1649
1697
Arc :: clone ( & tx_broadcaster) ,
1650
1698
Arc :: clone ( & fee_estimator) ,
1651
- None :: < Arc < dyn Filter + Sync + Send > > ,
1699
+ None :: < Arc < test_utils :: TestChainSource > > ,
1652
1700
Arc :: clone ( & keys_manager) ,
1653
1701
wallet,
1654
1702
Arc :: clone ( & kv_store) ,
@@ -1888,6 +1936,7 @@ mod tests {
1888
1936
nodes[ 0 ] . p2p_gossip_sync ( ) ,
1889
1937
nodes[ 0 ] . peer_manager . clone ( ) ,
1890
1938
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
1939
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
1891
1940
nodes[ 0 ] . logger . clone ( ) ,
1892
1941
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
1893
1942
) ;
@@ -1982,6 +2031,7 @@ mod tests {
1982
2031
nodes[ 0 ] . no_gossip_sync ( ) ,
1983
2032
nodes[ 0 ] . peer_manager . clone ( ) ,
1984
2033
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2034
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
1985
2035
nodes[ 0 ] . logger . clone ( ) ,
1986
2036
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
1987
2037
) ;
@@ -2025,6 +2075,7 @@ mod tests {
2025
2075
nodes[ 0 ] . no_gossip_sync ( ) ,
2026
2076
nodes[ 0 ] . peer_manager . clone ( ) ,
2027
2077
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2078
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2028
2079
nodes[ 0 ] . logger . clone ( ) ,
2029
2080
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2030
2081
) ;
@@ -2058,6 +2109,7 @@ mod tests {
2058
2109
nodes[ 0 ] . rapid_gossip_sync ( ) ,
2059
2110
nodes[ 0 ] . peer_manager . clone ( ) ,
2060
2111
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2112
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2061
2113
nodes[ 0 ] . logger . clone ( ) ,
2062
2114
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2063
2115
move |dur : Duration | {
@@ -2095,6 +2147,7 @@ mod tests {
2095
2147
nodes[ 0 ] . p2p_gossip_sync ( ) ,
2096
2148
nodes[ 0 ] . peer_manager . clone ( ) ,
2097
2149
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2150
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2098
2151
nodes[ 0 ] . logger . clone ( ) ,
2099
2152
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2100
2153
) ;
@@ -2125,6 +2178,7 @@ mod tests {
2125
2178
nodes[ 0 ] . no_gossip_sync ( ) ,
2126
2179
nodes[ 0 ] . peer_manager . clone ( ) ,
2127
2180
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2181
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2128
2182
nodes[ 0 ] . logger . clone ( ) ,
2129
2183
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2130
2184
) ;
@@ -2172,6 +2226,7 @@ mod tests {
2172
2226
nodes[ 0 ] . no_gossip_sync ( ) ,
2173
2227
nodes[ 0 ] . peer_manager . clone ( ) ,
2174
2228
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2229
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2175
2230
nodes[ 0 ] . logger . clone ( ) ,
2176
2231
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2177
2232
) ;
@@ -2235,6 +2290,7 @@ mod tests {
2235
2290
nodes[ 0 ] . no_gossip_sync ( ) ,
2236
2291
nodes[ 0 ] . peer_manager . clone ( ) ,
2237
2292
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2293
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2238
2294
nodes[ 0 ] . logger . clone ( ) ,
2239
2295
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2240
2296
) ;
@@ -2280,10 +2336,22 @@ mod tests {
2280
2336
2281
2337
advance_chain ( & mut nodes[ 0 ] , 3 ) ;
2282
2338
2339
+ let tx_broadcaster = nodes[ 0 ] . tx_broadcaster . clone ( ) ;
2340
+ let wait_for_sweep_tx = || -> Transaction {
2341
+ loop {
2342
+ let sweep_tx = tx_broadcaster. txn_broadcasted . lock ( ) . unwrap ( ) . pop ( ) ;
2343
+ if let Some ( sweep_tx) = sweep_tx {
2344
+ return sweep_tx;
2345
+ }
2346
+
2347
+ std:: thread:: sleep ( Duration :: from_millis ( 10 ) ) ;
2348
+ }
2349
+ } ;
2350
+
2283
2351
// Check we generate an initial sweeping tx.
2284
2352
assert_eq ! ( nodes[ 0 ] . sweeper. tracked_spendable_outputs( ) . len( ) , 1 ) ;
2353
+ let sweep_tx_0 = wait_for_sweep_tx ( ) ;
2285
2354
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
2355
match tracked_output. status {
2288
2356
OutputSpendStatus :: PendingFirstConfirmation { latest_spending_tx, .. } => {
2289
2357
assert_eq ! ( sweep_tx_0. compute_txid( ) , latest_spending_tx. compute_txid( ) ) ;
@@ -2294,8 +2362,8 @@ mod tests {
2294
2362
// Check we regenerate and rebroadcast the sweeping tx each block.
2295
2363
advance_chain ( & mut nodes[ 0 ] , 1 ) ;
2296
2364
assert_eq ! ( nodes[ 0 ] . sweeper. tracked_spendable_outputs( ) . len( ) , 1 ) ;
2365
+ let sweep_tx_1 = wait_for_sweep_tx ( ) ;
2297
2366
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
2367
match tracked_output. status {
2300
2368
OutputSpendStatus :: PendingFirstConfirmation { latest_spending_tx, .. } => {
2301
2369
assert_eq ! ( sweep_tx_1. compute_txid( ) , latest_spending_tx. compute_txid( ) ) ;
@@ -2306,8 +2374,8 @@ mod tests {
2306
2374
2307
2375
advance_chain ( & mut nodes[ 0 ] , 1 ) ;
2308
2376
assert_eq ! ( nodes[ 0 ] . sweeper. tracked_spendable_outputs( ) . len( ) , 1 ) ;
2377
+ let sweep_tx_2 = wait_for_sweep_tx ( ) ;
2309
2378
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
2379
match tracked_output. status {
2312
2380
OutputSpendStatus :: PendingFirstConfirmation { latest_spending_tx, .. } => {
2313
2381
assert_eq ! ( sweep_tx_2. compute_txid( ) , latest_spending_tx. compute_txid( ) ) ;
@@ -2387,6 +2455,7 @@ mod tests {
2387
2455
nodes[ 0 ] . no_gossip_sync ( ) ,
2388
2456
nodes[ 0 ] . peer_manager . clone ( ) ,
2389
2457
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2458
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2390
2459
nodes[ 0 ] . logger . clone ( ) ,
2391
2460
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2392
2461
) ;
@@ -2417,6 +2486,7 @@ mod tests {
2417
2486
nodes[ 0 ] . no_gossip_sync ( ) ,
2418
2487
nodes[ 0 ] . peer_manager . clone ( ) ,
2419
2488
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2489
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2420
2490
nodes[ 0 ] . logger . clone ( ) ,
2421
2491
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2422
2492
) ;
@@ -2513,6 +2583,7 @@ mod tests {
2513
2583
nodes[ 0 ] . rapid_gossip_sync ( ) ,
2514
2584
nodes[ 0 ] . peer_manager . clone ( ) ,
2515
2585
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2586
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2516
2587
nodes[ 0 ] . logger . clone ( ) ,
2517
2588
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2518
2589
) ;
@@ -2546,6 +2617,7 @@ mod tests {
2546
2617
nodes[ 0 ] . rapid_gossip_sync ( ) ,
2547
2618
nodes[ 0 ] . peer_manager . clone ( ) ,
2548
2619
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2620
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2549
2621
nodes[ 0 ] . logger . clone ( ) ,
2550
2622
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2551
2623
move |dur : Duration | {
@@ -2709,6 +2781,7 @@ mod tests {
2709
2781
nodes[ 0 ] . no_gossip_sync ( ) ,
2710
2782
nodes[ 0 ] . peer_manager . clone ( ) ,
2711
2783
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2784
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2712
2785
nodes[ 0 ] . logger . clone ( ) ,
2713
2786
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2714
2787
) ;
@@ -2760,6 +2833,7 @@ mod tests {
2760
2833
nodes[ 0 ] . no_gossip_sync ( ) ,
2761
2834
nodes[ 0 ] . peer_manager . clone ( ) ,
2762
2835
Some ( Arc :: clone ( & nodes[ 0 ] . liquidity_manager ) ) ,
2836
+ Some ( nodes[ 0 ] . sweeper . clone ( ) ) ,
2763
2837
nodes[ 0 ] . logger . clone ( ) ,
2764
2838
Some ( nodes[ 0 ] . scorer . clone ( ) ) ,
2765
2839
move |dur : Duration | {
0 commit comments