@@ -1139,64 +1139,13 @@ impl BackgroundProcessor {
11391139 }
11401140 }
11411141
1142- /// Creates a new [`BackgroundProcessorBuilder`] to construct a [`BackgroundProcessor`] with optional components.
1143- pub fn builder <
1144- ' a ,
1145- UL : ' static + Deref + Send + Sync ,
1146- CF : ' static + Deref + Send + Sync ,
1147- T : ' static + Deref + Send + Sync ,
1148- F : ' static + Deref + Send + Sync ,
1149- G : ' static + Deref < Target = NetworkGraph < L > > + Send + Sync ,
1150- L : ' static + Deref + Send + Sync ,
1151- P : ' static + Deref + Send + Sync ,
1152- EH : ' static + EventHandler + Send ,
1153- PS : ' static + Deref + Send ,
1154- M : ' static
1155- + Deref < Target = ChainMonitor < <CM :: Target as AChannelManager >:: Signer , CF , T , F , L , P > >
1156- + Send
1157- + Sync ,
1158- CM : ' static + Deref + Send + Sync ,
1159- OM : ' static + Deref + Send + Sync ,
1160- PGS : ' static + Deref < Target = P2PGossipSync < G , UL , L > > + Send + Sync ,
1161- RGS : ' static + Deref < Target = RapidGossipSync < G , L > > + Send ,
1162- PM : ' static + Deref + Send + Sync ,
1163- S : ' static + Deref < Target = SC > + Send + Sync ,
1164- SC : for < ' b > WriteableScore < ' b > ,
1165- > (
1166- persister : PS , event_handler : EH , chain_monitor : M , channel_manager : CM ,
1167- gossip_sync : GossipSync < PGS , RGS , G , UL , L > , peer_manager : PM , logger : L ,
1168- ) -> BackgroundProcessorBuilder < ' a , UL , CF , T , F , G , L , P , EH , PS , M , CM , OM , PGS , RGS , PM , S , SC >
1169- where
1170- UL :: Target : ' static + UtxoLookup ,
1171- CF :: Target : ' static + chain:: Filter ,
1172- T :: Target : ' static + BroadcasterInterface ,
1173- F :: Target : ' static + FeeEstimator ,
1174- L :: Target : ' static + Logger ,
1175- P :: Target : ' static + Persist < <CM :: Target as AChannelManager >:: Signer > ,
1176- PS :: Target : ' static + Persister < ' a , CM , L , S > ,
1177- CM :: Target : AChannelManager + Send + Sync ,
1178- OM :: Target : AOnionMessenger + Send + Sync ,
1179- PM :: Target : APeerManager + Send + Sync ,
1180- {
1181- BackgroundProcessorBuilder :: new (
1182- persister,
1183- event_handler,
1184- chain_monitor,
1185- channel_manager,
1186- gossip_sync,
1187- peer_manager,
1188- logger,
1189- )
1190- }
11911142}
11921143
11931144/// A builder for constructing a [`BackgroundProcessor`] with optional components.
11941145///
11951146/// This builder provides a flexible and type-safe way to construct a [`BackgroundProcessor`]
11961147/// with optional components like `onion_messenger` and `scorer`. It helps avoid specifying
11971148/// concrete types for components that aren't being used.
1198- ///
1199- /// Use [`BackgroundProcessor::builder`] to create a new builder instance.
12001149#[ cfg( feature = "std" ) ]
12011150pub struct BackgroundProcessorBuilder <
12021151 ' a ,
@@ -1280,8 +1229,8 @@ where
12801229 OM :: Target : AOnionMessenger + Send + Sync ,
12811230 PM :: Target : APeerManager + Send + Sync ,
12821231{
1283- /// Creates a new builder instance. This is an internal method - use [`BackgroundProcessor::builder`] instead.
1284- pub fn new (
1232+ /// Creates a new builder instance.
1233+ pub ( crate ) fn new (
12851234 persister : PS , event_handler : EH , chain_monitor : M , channel_manager : CM ,
12861235 gossip_sync : GossipSync < PGS , RGS , G , UL , L > , peer_manager : PM , logger : L ,
12871236 ) -> Self {
@@ -3068,7 +3017,7 @@ mod tests {
30683017 let data_dir = nodes[ 0 ] . kv_store . get_data_dir ( ) ;
30693018 let persister = Arc :: new ( Persister :: new ( data_dir) ) ;
30703019 let event_handler = |_: _ | Ok ( ( ) ) ;
3071- let bg_processor = BackgroundProcessor :: builder (
3020+ let bg_processor = BackgroundProcessorBuilder :: new (
30723021 persister,
30733022 event_handler,
30743023 nodes[ 0 ] . chain_monitor . clone ( ) ,
0 commit comments