Skip to content

Commit 00ac430

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

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

+12-11
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ impl BackgroundProcessor {
10361036
/// # Example
10371037
/// ```
10381038
/// # use lightning_background_processor::*;
1039-
/// let config = BackgroundProcessorBuilder::new(
1039+
/// let config = BackgroundProcessorConfigBuilder::new(
10401040
/// persister,
10411041
/// event_handler,
10421042
/// chain_monitor,
@@ -1168,7 +1168,7 @@ impl BackgroundProcessor {
11681168
/// including required components (like the channel manager and peer manager) and optional
11691169
/// components (like the onion messenger and scorer).
11701170
///
1171-
/// The configuration can be constructed using [`BackgroundProcessorBuilder`], which provides
1171+
/// The configuration can be constructed using [`BackgroundProcessorConfigBuilder`], which provides
11721172
/// a convenient builder pattern for setting up both required and optional components.
11731173
///
11741174
/// This same configuration can be used for
@@ -1186,7 +1186,7 @@ impl BackgroundProcessor {
11861186
/// # Example
11871187
/// ```
11881188
/// # use lightning_background_processor::*;
1189-
/// let config = BackgroundProcessorBuilder::new(
1189+
/// let config = BackgroundProcessorConfigBuilder::new(
11901190
/// persister,
11911191
/// event_handler,
11921192
/// chain_monitor,
@@ -1256,13 +1256,13 @@ pub struct BackgroundProcessorConfig<
12561256
_phantom: PhantomData<(&'a (), CF, T, F, P)>,
12571257
}
12581258

1259-
/// A builder for constructing a [`BackgroundProcessor`] with optional components.
1259+
/// A builder for constructing a [`BackgroundProcessorConfig`] with optional components.
12601260
///
1261-
/// This builder provides a flexible and type-safe way to construct a [`BackgroundProcessor`]
1261+
/// This builder provides a flexible and type-safe way to construct a [`BackgroundProcessorConfig`]
12621262
/// with optional components like `onion_messenger` and `scorer`. It helps avoid specifying
12631263
/// concrete types for components that aren't being used.
12641264
#[cfg(feature = "std")]
1265-
pub struct BackgroundProcessorBuilder<
1265+
pub struct BackgroundProcessorConfigBuilder<
12661266
'a,
12671267
UL: 'static + Deref + Send + Sync,
12681268
CF: 'static + Deref + Send + Sync,
@@ -1331,7 +1331,8 @@ impl<
13311331
PM: 'static + Deref + Send + Sync,
13321332
S: 'static + Deref<Target = SC> + Send + Sync,
13331333
SC: for<'b> WriteableScore<'b>,
1334-
> BackgroundProcessorBuilder<'a, UL, CF, T, F, G, L, P, EH, PS, M, CM, OM, PGS, RGS, PM, S, SC>
1334+
>
1335+
BackgroundProcessorConfigBuilder<'a, UL, CF, T, F, G, L, P, EH, PS, M, CM, OM, PGS, RGS, PM, S, SC>
13351336
where
13361337
UL::Target: 'static + UtxoLookup,
13371338
CF::Target: 'static + chain::Filter,
@@ -2337,7 +2338,7 @@ mod tests {
23372338
Persister::new(data_dir).with_manager_error(std::io::ErrorKind::Other, "test"),
23382339
);
23392340

2340-
let config = BackgroundProcessorBuilder::new(
2341+
let config = BackgroundProcessorConfigBuilder::new(
23412342
persister,
23422343
|_: _| async { Ok(()) },
23432344
nodes[0].chain_monitor.clone(),
@@ -2821,7 +2822,7 @@ mod tests {
28212822
let data_dir = nodes[0].kv_store.get_data_dir();
28222823
let persister = Arc::new(Persister::new(data_dir).with_graph_persistence_notifier(sender));
28232824

2824-
let config = BackgroundProcessorBuilder::new(
2825+
let config = BackgroundProcessorConfigBuilder::new(
28252826
persister,
28262827
|_: _| async { Ok(()) },
28272828
nodes[0].chain_monitor.clone(),
@@ -3039,7 +3040,7 @@ mod tests {
30393040

30403041
let (exit_sender, exit_receiver) = tokio::sync::watch::channel(());
30413042

3042-
let config = BackgroundProcessorBuilder::new(
3043+
let config = BackgroundProcessorConfigBuilder::new(
30433044
persister,
30443045
event_handler,
30453046
nodes[0].chain_monitor.clone(),
@@ -3100,7 +3101,7 @@ mod tests {
31003101
let data_dir = nodes[0].kv_store.get_data_dir();
31013102
let persister = Arc::new(Persister::new(data_dir));
31023103
let event_handler = |_: _| Ok(());
3103-
let config = BackgroundProcessorBuilder::new(
3104+
let config = BackgroundProcessorConfigBuilder::new(
31043105
persister,
31053106
event_handler,
31063107
nodes[0].chain_monitor.clone(),

0 commit comments

Comments
 (0)