mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
client: use cached info to log connected node
This commit is contained in:
parent
8848d30fb3
commit
3da09aac0e
1 changed files with 3 additions and 9 deletions
12
client.go
12
client.go
|
|
@ -2,9 +2,7 @@ package loop
|
|||
|
||||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
|
@ -211,13 +209,9 @@ func (s *Client) Run(ctx context.Context,
|
|||
}
|
||||
|
||||
// Log connected node.
|
||||
info, err := s.lndServices.Client.GetInfo(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetInfo error: %v", err)
|
||||
}
|
||||
log.Infof("Connected to lnd node %v with pubkey %v",
|
||||
info.Alias, hex.EncodeToString(info.IdentityPubkey[:]),
|
||||
)
|
||||
log.Infof("Connected to lnd node '%v' with pubkey %x (version %s)",
|
||||
s.lndServices.NodeAlias, s.lndServices.NodePubkey,
|
||||
lndclient.VersionString(s.lndServices.Version))
|
||||
|
||||
// Setup main context used for cancelation.
|
||||
mainCtx, mainCancel := context.WithCancel(ctx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue