@@ -1139,64 +1139,13 @@ impl BackgroundProcessor {
1139
1139
}
1140
1140
}
1141
1141
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
- }
1191
1142
}
1192
1143
1193
1144
/// A builder for constructing a [`BackgroundProcessor`] with optional components.
1194
1145
///
1195
1146
/// This builder provides a flexible and type-safe way to construct a [`BackgroundProcessor`]
1196
1147
/// with optional components like `onion_messenger` and `scorer`. It helps avoid specifying
1197
1148
/// concrete types for components that aren't being used.
1198
- ///
1199
- /// Use [`BackgroundProcessor::builder`] to create a new builder instance.
1200
1149
#[ cfg( feature = "std" ) ]
1201
1150
pub struct BackgroundProcessorBuilder <
1202
1151
' a ,
@@ -1280,8 +1229,8 @@ where
1280
1229
OM :: Target : AOnionMessenger + Send + Sync ,
1281
1230
PM :: Target : APeerManager + Send + Sync ,
1282
1231
{
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 (
1285
1234
persister : PS , event_handler : EH , chain_monitor : M , channel_manager : CM ,
1286
1235
gossip_sync : GossipSync < PGS , RGS , G , UL , L > , peer_manager : PM , logger : L ,
1287
1236
) -> Self {
@@ -3068,7 +3017,7 @@ mod tests {
3068
3017
let data_dir = nodes[ 0 ] . kv_store . get_data_dir ( ) ;
3069
3018
let persister = Arc :: new ( Persister :: new ( data_dir) ) ;
3070
3019
let event_handler = |_: _ | Ok ( ( ) ) ;
3071
- let bg_processor = BackgroundProcessor :: builder (
3020
+ let bg_processor = BackgroundProcessorBuilder :: new (
3072
3021
persister,
3073
3022
event_handler,
3074
3023
nodes[ 0 ] . chain_monitor . clone ( ) ,
0 commit comments