Skip to content

Commit b26c375

Browse files
committed
rename builder to BackgroundProcessorConfigBuilder
The builder s and returns a object, so renaming it to seems more suitable.
1 parent 05a0abd commit b26c375

File tree

1 file changed

+12
-11
lines changed
  • lightning-background-processor/src

1 file changed

+12
-11
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ impl BackgroundProcessor {
11081108
/// # Example
11091109
/// ```
11101110
/// # use lightning_background_processor::*;
1111-
/// let config = BackgroundProcessorBuilder::new(
1111+
/// let config = BackgroundProcessorConfigBuilder::new(
11121112
/// persister,
11131113
/// event_handler,
11141114
/// chain_monitor,
@@ -1240,7 +1240,7 @@ impl BackgroundProcessor {
12401240
/// including required components (like the channel manager and peer manager) and optional
12411241
/// components (like the onion messenger and scorer).
12421242
///
1243-
/// The configuration can be constructed using [`BackgroundProcessorBuilder`], which provides
1243+
/// The configuration can be constructed using [`BackgroundProcessorConfigBuilder`], which provides
12441244
/// a convenient builder pattern for setting up both required and optional components.
12451245
///
12461246
/// This same configuration can be used for
@@ -1258,7 +1258,7 @@ impl BackgroundProcessor {
12581258
/// # Example
12591259
/// ```
12601260
/// # use lightning_background_processor::*;
1261-
/// let config = BackgroundProcessorBuilder::new(
1261+
/// let config = BackgroundProcessorConfigBuilder::new(
12621262
/// persister,
12631263
/// event_handler,
12641264
/// chain_monitor,
@@ -1328,13 +1328,13 @@ pub struct BackgroundProcessorConfig<
13281328
_phantom: PhantomData<(&'a (), CF, T, F, P)>,
13291329
}
13301330

1331-
/// A builder for constructing a [`BackgroundProcessor`] with optional components.
1331+
/// A builder for constructing a [`BackgroundProcessorConfig`] with optional components.
13321332
///
1333-
/// This builder provides a flexible and type-safe way to construct a [`BackgroundProcessor`]
1333+
/// This builder provides a flexible and type-safe way to construct a [`BackgroundProcessorConfig`]
13341334
/// with optional components like `onion_messenger` and `scorer`. It helps avoid specifying
13351335
/// concrete types for components that aren't being used.
13361336
#[cfg(feature = "std")]
1337-
pub struct BackgroundProcessorBuilder<
1337+
pub struct BackgroundProcessorConfigBuilder<
13381338
'a,
13391339
UL: 'static + Deref + Send + Sync,
13401340
CF: 'static + Deref + Send + Sync,
@@ -1403,7 +1403,8 @@ impl<
14031403
PM: 'static + Deref + Send + Sync,
14041404
S: 'static + Deref<Target = SC> + Send + Sync,
14051405
SC: for<'b> WriteableScore<'b>,
1406-
> BackgroundProcessorBuilder<'a, UL, CF, T, F, G, L, P, EH, PS, M, CM, OM, PGS, RGS, PM, S, SC>
1406+
>
1407+
BackgroundProcessorConfigBuilder<'a, UL, CF, T, F, G, L, P, EH, PS, M, CM, OM, PGS, RGS, PM, S, SC>
14071408
where
14081409
UL::Target: 'static + UtxoLookup,
14091410
CF::Target: 'static + chain::Filter,
@@ -2428,7 +2429,7 @@ mod tests {
24282429
Persister::new(data_dir).with_manager_error(std::io::ErrorKind::Other, "test"),
24292430
);
24302431

2431-
let config = BackgroundProcessorBuilder::new(
2432+
let config = BackgroundProcessorConfigBuilder::new(
24322433
persister,
24332434
|_: _| async { Ok(()) },
24342435
nodes[0].chain_monitor.clone(),
@@ -2939,7 +2940,7 @@ mod tests {
29392940
let data_dir = nodes[0].kv_store.get_data_dir();
29402941
let persister = Arc::new(Persister::new(data_dir).with_graph_persistence_notifier(sender));
29412942

2942-
let config = BackgroundProcessorBuilder::new(
2943+
let config = BackgroundProcessorConfigBuilder::new(
29432944
persister,
29442945
|_: _| async { Ok(()) },
29452946
nodes[0].chain_monitor.clone(),
@@ -3160,7 +3161,7 @@ mod tests {
31603161

31613162
let (exit_sender, exit_receiver) = tokio::sync::watch::channel(());
31623163

3163-
let config = BackgroundProcessorBuilder::new(
3164+
let config = BackgroundProcessorConfigBuilder::new(
31643165
persister,
31653166
event_handler,
31663167
nodes[0].chain_monitor.clone(),
@@ -3223,7 +3224,7 @@ mod tests {
32233224
let data_dir = nodes[0].kv_store.get_data_dir();
32243225
let persister = Arc::new(Persister::new(data_dir));
32253226
let event_handler = |_: _| Ok(());
3226-
let config = BackgroundProcessorBuilder::new(
3227+
let config = BackgroundProcessorConfigBuilder::new(
32273228
persister,
32283229
event_handler,
32293230
nodes[0].chain_monitor.clone(),

0 commit comments

Comments
 (0)