File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import (
21
21
"github.com/breez/lspd/config"
22
22
"github.com/breez/lspd/history"
23
23
"github.com/breez/lspd/interceptor"
24
+ "github.com/breez/lspd/lightning"
24
25
"github.com/breez/lspd/lnd"
25
26
"github.com/breez/lspd/lsps0"
26
27
"github.com/breez/lspd/lsps2"
@@ -314,7 +315,19 @@ func initializeNodes(configs []*config.NodeConfig) ([]*common.Node, error) {
314
315
// in config.
315
316
info , err := node .Client .GetInfo ()
316
317
if err != nil {
317
- return nil , fmt .Errorf ("failed to get info from host %s" , node .NodeConfig .Host )
318
+ decodedPubkey , decodeErr := hex .DecodeString (
319
+ node .NodeConfig .NodePubkey )
320
+ if node .NodeConfig .Name == "" || node .NodeConfig .NodePubkey == "" ||
321
+ decodeErr != nil || len (decodedPubkey ) != 33 {
322
+
323
+ return nil , fmt .Errorf ("failed to get info from host %s" ,
324
+ node .NodeConfig .Host )
325
+ }
326
+
327
+ info = & lightning.GetInfoResult {
328
+ Alias : node .NodeConfig .Name ,
329
+ Pubkey : node .NodeConfig .NodePubkey ,
330
+ }
318
331
}
319
332
320
333
if node .NodeConfig .Name == "" {
You can’t perform that action at this time.
0 commit comments