Skip to content

Question about duplicate Start() calls in LndChallenger initialization #169

Open
@shaojunda

Description

@shaojunda

Description:

I noticed that the Start() method of LndChallenger is called twice during initialization:

  1. First call in NewLndChallenger (lnd.go#L68)
  2. The second call in NewLNCChallenger (lnc.go#L44)

While analyzing the Start() method implementation, I found that it:

  • Initializes invoice state tracking
  • Creates invoice subscriptions
  • Starts background goroutines

Questions:

  1. Is this double initialization intentional?
  2. If not, should we remove the Start() call from NewLndChallenger and let the caller handle initialization?

I'd appreciate any clarification on the design decision behind this pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions