mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-18 17:44:20 +01:00
aperture+challenger: add error channel to challenger
To make sure we can capture errors in the challenger's invoice subscription, we hand the main error channel to the challenger so it can report back errors on it.
This commit is contained in:
@@ -110,7 +110,10 @@ func run() error {
|
||||
Value: price,
|
||||
}, nil
|
||||
}
|
||||
challenger, err := NewLndChallenger(cfg.Authenticator, genInvoiceReq)
|
||||
errChan := make(chan error)
|
||||
challenger, err := NewLndChallenger(
|
||||
cfg.Authenticator, genInvoiceReq, errChan,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -164,7 +167,6 @@ func run() error {
|
||||
)
|
||||
log.Infof("Starting the server, listening on %s.", cfg.ListenAddr)
|
||||
|
||||
errChan := make(chan error)
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
||||
Reference in New Issue
Block a user