mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-21 15:54:25 +01:00
use cln plugin wrapper in interceptor
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/breez/lspd/basetypes"
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
@@ -23,7 +24,9 @@ var (
|
||||
CLOSED_STATUSES = []string{"CLOSED"}
|
||||
)
|
||||
|
||||
func NewClnClient(rpcFile string, lightningDir string) *ClnClient {
|
||||
func NewClnClient() *ClnClient {
|
||||
rpcFile := os.Getenv("CLN_SOCKET_NAME")
|
||||
lightningDir := os.Getenv("CLN_SOCKET_DIR")
|
||||
client := glightning.NewLightning()
|
||||
client.SetTimeout(60)
|
||||
client.StartUp(rpcFile, lightningDir)
|
||||
|
||||
Reference in New Issue
Block a user