From f669ef0dd7b09eaad1fc71bf884cd2b55acef502 Mon Sep 17 00:00:00 2001 From: Jesse de Wit Date: Fri, 11 Aug 2023 14:20:29 +0200 Subject: [PATCH] lsps0: hook up lsps0 server --- main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.go b/main.go index 29657387..8961d54e 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,7 @@ import ( "github.com/breez/lspd/config" "github.com/breez/lspd/interceptor" "github.com/breez/lspd/lnd" + "github.com/breez/lspd/lsps0" "github.com/breez/lspd/mempool" "github.com/breez/lspd/notifications" "github.com/breez/lspd/postgresql" @@ -110,6 +111,14 @@ func main() { if err != nil { log.Fatalf("failed to initialize CLN interceptor: %v", err) } + + msgClient := cln.NewCustomMsgClient(node.Cln, client) + go msgClient.Start() + msgServer := lsps0.NewServer() + protocolServer := lsps0.NewProtocolServer([]uint32{2}) + lsps0.RegisterProtocolServer(msgServer, protocolServer) + msgClient.WaitStarted() + go msgServer.Serve(msgClient) } if htlcInterceptor == nil {