Skip to content

Commit

Permalink
lsps0: hook up lsps0 server
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Aug 11, 2023
1 parent e2ebbfc commit f669ef0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f669ef0

Please sign in to comment.