@@ -1050,42 +1050,13 @@ impl BackgroundProcessor {
10501050 }
10511051 }
10521052
1053- /// Creates a new [`BackgroundProcessorBuilder`] to construct a [`BackgroundProcessor`] with optional components.
1054- pub fn builder < ' a , PS , EH , M , CM , PGS , RGS , G , UL , L , PM > (
1055- persister : PS , event_handler : EH , chain_monitor : M , channel_manager : CM ,
1056- gossip_sync : GossipSync < PGS , RGS , G , UL , L > , peer_manager : PM , logger : L ,
1057- ) -> BackgroundProcessorBuilder < ' a , PS , EH , M , CM , ( ) , PGS , RGS , G , UL , L , PM , ( ) >
1058- where
1059- PS : ' static + Deref + Send ,
1060- EH : ' static + EventHandler + Send ,
1061- M : ' static + Deref + Send + Sync ,
1062- CM : ' static + Deref + Send + Sync ,
1063- PGS : ' static + Deref < Target = P2PGossipSync < G , UL , L > > + Send + Sync ,
1064- RGS : ' static + Deref < Target = RapidGossipSync < G , L > > + Send ,
1065- G : ' static + Deref < Target = NetworkGraph < L > > + Send + Sync ,
1066- UL : ' static + Deref + Send + Sync ,
1067- L : ' static + Deref + Send + Sync ,
1068- PM : ' static + Deref + Send + Sync ,
1069- {
1070- BackgroundProcessorBuilder :: new (
1071- persister,
1072- event_handler,
1073- chain_monitor,
1074- channel_manager,
1075- gossip_sync,
1076- peer_manager,
1077- logger,
1078- )
1079- }
10801053}
10811054
10821055/// A builder for constructing a [`BackgroundProcessor`] with optional components.
10831056///
10841057/// This builder provides a flexible and type-safe way to construct a [`BackgroundProcessor`]
10851058/// with optional components like `onion_messenger` and `scorer`. It helps avoid specifying
10861059/// concrete types for components that aren't being used.
1087- ///
1088- /// Use [`BackgroundProcessor::builder`] to create a new builder instance.
10891060#[ cfg( feature = "std" ) ]
10901061pub struct BackgroundProcessorBuilder <
10911062 ' a ,
@@ -1169,7 +1140,7 @@ where
11691140 OM :: Target : AOnionMessenger + Send + Sync ,
11701141 PM :: Target : APeerManager + Send + Sync ,
11711142{
1172- /// Creates a new builder instance. This is an internal method - use [`BackgroundProcessor::builder`] instead.
1143+ /// Creates a new builder instance.
11731144 pub ( crate ) fn new (
11741145 persister : PS , event_handler : EH , chain_monitor : M , channel_manager : CM ,
11751146 gossip_sync : GossipSync < PGS , RGS , G , UL , L > , peer_manager : PM , logger : L ,
@@ -2906,7 +2877,7 @@ mod tests {
29062877 let data_dir = nodes[ 0 ] . kv_store . get_data_dir ( ) ;
29072878 let persister = Arc :: new ( Persister :: new ( data_dir) ) ;
29082879 let event_handler = |_: _ | Ok ( ( ) ) ;
2909- let bg_processor = BackgroundProcessor :: builder (
2880+ let bg_processor = BackgroundProcessorBuilder :: new (
29102881 persister,
29112882 event_handler,
29122883 nodes[ 0 ] . chain_monitor . clone ( ) ,
0 commit comments