mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-24 01:04:21 +01:00
notifications: notify htlc when peer offline
This commit is contained in:
5
main.go
5
main.go
@@ -79,6 +79,7 @@ func main() {
|
||||
interceptStore := postgresql.NewPostgresInterceptStore(pool)
|
||||
forwardingStore := postgresql.NewForwardingEventStore(pool)
|
||||
notificationsStore := postgresql.NewNotificationsStore(pool)
|
||||
notificationService := notifications.NewNotificationService(notificationsStore)
|
||||
|
||||
var interceptors []interceptor.HtlcInterceptor
|
||||
for _, node := range nodes {
|
||||
@@ -91,7 +92,7 @@ func main() {
|
||||
|
||||
client.StartListeners()
|
||||
fwsync := lnd.NewForwardingHistorySync(client, interceptStore, forwardingStore)
|
||||
interceptor := interceptor.NewInterceptor(client, node, interceptStore, feeEstimator, feeStrategy)
|
||||
interceptor := interceptor.NewInterceptor(client, node, interceptStore, feeEstimator, feeStrategy, notificationService)
|
||||
htlcInterceptor, err = lnd.NewLndHtlcInterceptor(node, client, fwsync, interceptor)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to initialize LND interceptor: %v", err)
|
||||
@@ -104,7 +105,7 @@ func main() {
|
||||
log.Fatalf("failed to initialize CLN client: %v", err)
|
||||
}
|
||||
|
||||
interceptor := interceptor.NewInterceptor(client, node, interceptStore, feeEstimator, feeStrategy)
|
||||
interceptor := interceptor.NewInterceptor(client, node, interceptStore, feeEstimator, feeStrategy, notificationService)
|
||||
htlcInterceptor, err = cln.NewClnHtlcInterceptor(node, client, interceptor)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to initialize CLN interceptor: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user