Skip to content

Commit 3da09aa

Browse files
committed
client: use cached info to log connected node
1 parent 8848d30 commit 3da09aa

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

client.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ package loop
22

33
import (
44
"context"
5-
"encoding/hex"
65
"errors"
7-
"fmt"
86
"strings"
97
"sync"
108
"sync/atomic"
@@ -211,13 +209,9 @@ func (s *Client) Run(ctx context.Context,
211209
}
212210

213211
// Log connected node.
214-
info, err := s.lndServices.Client.GetInfo(ctx)
215-
if err != nil {
216-
return fmt.Errorf("GetInfo error: %v", err)
217-
}
218-
log.Infof("Connected to lnd node %v with pubkey %v",
219-
info.Alias, hex.EncodeToString(info.IdentityPubkey[:]),
220-
)
212+
log.Infof("Connected to lnd node '%v' with pubkey %x (version %s)",
213+
s.lndServices.NodeAlias, s.lndServices.NodePubkey,
214+
lndclient.VersionString(s.lndServices.Version))
221215

222216
// Setup main context used for cancelation.
223217
mainCtx, mainCancel := context.WithCancel(ctx)

0 commit comments

Comments
 (0)