|
|
@ -2,9 +2,7 @@ package loop
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"context"
|
|
|
|
"encoding/hex"
|
|
|
|
|
|
|
|
"errors"
|
|
|
|
"errors"
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"sync"
|
|
|
|
"sync"
|
|
|
|
"sync/atomic"
|
|
|
|
"sync/atomic"
|
|
|
@ -211,13 +209,9 @@ func (s *Client) Run(ctx context.Context,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Log connected node.
|
|
|
|
// Log connected node.
|
|
|
|
info, err := s.lndServices.Client.GetInfo(ctx)
|
|
|
|
log.Infof("Connected to lnd node '%v' with pubkey %x (version %s)",
|
|
|
|
if err != nil {
|
|
|
|
s.lndServices.NodeAlias, s.lndServices.NodePubkey,
|
|
|
|
return fmt.Errorf("GetInfo error: %v", err)
|
|
|
|
lndclient.VersionString(s.lndServices.Version))
|
|
|
|
}
|
|
|
|
|
|
|
|
log.Infof("Connected to lnd node %v with pubkey %v",
|
|
|
|
|
|
|
|
info.Alias, hex.EncodeToString(info.IdentityPubkey[:]),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Setup main context used for cancelation.
|
|
|
|
// Setup main context used for cancelation.
|
|
|
|
mainCtx, mainCancel := context.WithCancel(ctx)
|
|
|
|
mainCtx, mainCancel := context.WithCancel(ctx)
|
|
|
|