@@ -1050,42 +1050,13 @@ impl BackgroundProcessor {
1050
1050
}
1051
1051
}
1052
1052
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
- }
1080
1053
}
1081
1054
1082
1055
/// A builder for constructing a [`BackgroundProcessor`] with optional components.
1083
1056
///
1084
1057
/// This builder provides a flexible and type-safe way to construct a [`BackgroundProcessor`]
1085
1058
/// with optional components like `onion_messenger` and `scorer`. It helps avoid specifying
1086
1059
/// concrete types for components that aren't being used.
1087
- ///
1088
- /// Use [`BackgroundProcessor::builder`] to create a new builder instance.
1089
1060
#[ cfg( feature = "std" ) ]
1090
1061
pub struct BackgroundProcessorBuilder <
1091
1062
' a ,
@@ -1169,7 +1140,7 @@ where
1169
1140
OM :: Target : AOnionMessenger + Send + Sync ,
1170
1141
PM :: Target : APeerManager + Send + Sync ,
1171
1142
{
1172
- /// Creates a new builder instance. This is an internal method - use [`BackgroundProcessor::builder`] instead.
1143
+ /// Creates a new builder instance.
1173
1144
pub ( crate ) fn new (
1174
1145
persister : PS , event_handler : EH , chain_monitor : M , channel_manager : CM ,
1175
1146
gossip_sync : GossipSync < PGS , RGS , G , UL , L > , peer_manager : PM , logger : L ,
@@ -2906,7 +2877,7 @@ mod tests {
2906
2877
let data_dir = nodes[ 0 ] . kv_store . get_data_dir ( ) ;
2907
2878
let persister = Arc :: new ( Persister :: new ( data_dir) ) ;
2908
2879
let event_handler = |_: _ | Ok ( ( ) ) ;
2909
- let bg_processor = BackgroundProcessor :: builder (
2880
+ let bg_processor = BackgroundProcessorBuilder :: new (
2910
2881
persister,
2911
2882
event_handler,
2912
2883
nodes[ 0 ] . chain_monitor . clone ( ) ,
0 commit comments