mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-20 15:24:23 +01:00
cleanup: move lightning client to seperate package
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
"github.com/breez/lspd/btceclegacy"
|
||||
"github.com/breez/lspd/config"
|
||||
"github.com/breez/lspd/lightning"
|
||||
lspdrpc "github.com/breez/lspd/rpc"
|
||||
ecies "github.com/ecies/go/v2"
|
||||
"github.com/golang/protobuf/proto"
|
||||
@@ -39,7 +40,7 @@ type server struct {
|
||||
}
|
||||
|
||||
type node struct {
|
||||
client LightningClient
|
||||
client lightning.Client
|
||||
nodeConfig *config.NodeConfig
|
||||
privateKey *btcec.PrivateKey
|
||||
publicKey *btcec.PublicKey
|
||||
@@ -140,7 +141,7 @@ func (s *server) OpenChannel(ctx context.Context, in *lspdrpc.OpenChannelRequest
|
||||
|
||||
var outPoint *wire.OutPoint
|
||||
if channelCount == 0 {
|
||||
outPoint, err = node.client.OpenChannel(&OpenChannelRequest{
|
||||
outPoint, err = node.client.OpenChannel(&lightning.OpenChannelRequest{
|
||||
CapacitySat: node.nodeConfig.ChannelAmount,
|
||||
Destination: pubkey,
|
||||
TargetConf: &node.nodeConfig.TargetConf,
|
||||
|
||||
Reference in New Issue
Block a user