rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

Add `BackgroundProcessor::start_without_om`

Open TheBlueMatt opened this issue 10 months ago • 5 comments

BackgroundProcessor::start takes an Option for the OnionMessenger which is quite annoying as it requires a concrete type for the OnionMessenger even when passing None. We should add a new constructor to make this easier for users.

TheBlueMatt avatar Feb 21 '25 20:02 TheBlueMatt

Hi @TheBlueMatt, I'll like to work on this issue. Can it be assigned to me please?

Anyitechs avatar Feb 25 '25 11:02 Anyitechs

Go for it!

TheBlueMatt avatar Feb 25 '25 13:02 TheBlueMatt

Go for it!

Thank you @TheBlueMatt. On it!

Anyitechs avatar Feb 25 '25 17:02 Anyitechs

It might be a bit late to mention this, but given that we'll need to introduce similar variants for LiquidiityManager in/post #3509, I wonder if we should use a builder pattern or have the BP take a BackgroundProcessorConfig or similar?

Otherwise the API might get a bit messy if we add constructors for all combinations of parameters?

tnull avatar Mar 03 '25 15:03 tnull

It might be a bit late to mention this, but given that we'll need to introduce similar variants for LiquidiityManager in/post #3509, I wonder if we should use a builder pattern or have the BP take a BackgroundProcessorConfig or similar?

Otherwise the API might get a bit messy if we add constructors for all combinations of parameters?

Good call @tnull. IMO I believe the builder pattern is the most flexible solution that can easily accommodate future additions. I'll open a PR for this mid next week.

Anyitechs avatar Mar 14 '25 20:03 Anyitechs