mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-18 14:24:21 +01:00
easy node id lookup
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Node struct {
|
type Node struct {
|
||||||
|
NodeId []byte
|
||||||
Client lightning.Client
|
Client lightning.Client
|
||||||
NodeConfig *config.NodeConfig
|
NodeConfig *config.NodeConfig
|
||||||
PrivateKey *btcec.PrivateKey
|
PrivateKey *btcec.PrivateKey
|
||||||
|
|||||||
6
main.go
6
main.go
@@ -304,6 +304,12 @@ func initializeNodes(configs []*config.NodeConfig) ([]*common.Node, error) {
|
|||||||
node.NodeConfig.NodePubkey = info.Pubkey
|
node.NodeConfig.NodePubkey = info.Pubkey
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nodeId, err := hex.DecodeString(info.Pubkey)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to parse node id %s", info.Pubkey)
|
||||||
|
}
|
||||||
|
|
||||||
|
node.NodeId = nodeId
|
||||||
node.Tokens = config.Tokens
|
node.Tokens = config.Tokens
|
||||||
nodes = append(nodes, node)
|
nodes = append(nodes, node)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user