From 44bb23186a756a582fdcb93c06831f24b7404832 Mon Sep 17 00:00:00 2001 From: bitromortac Date: Wed, 8 Oct 2025 12:51:16 +0200 Subject: [PATCH] faraday+frdrpcserver: pass in chan events store Threads the chanevents.Store the daemon already constructs into the frdrpcserver.Config so the upcoming GetChannelEvents handler has a read path. Both standalone and subserver startup wire the same store instance. --- faraday.go | 2 ++ frdrpcserver/rpcserver.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/faraday.go b/faraday.go index 0f15d38..314c0cf 100644 --- a/faraday.go +++ b/faraday.go @@ -179,6 +179,7 @@ func (f *Faraday) Start() error { cfg := &frdrpcserver.Config{ Lnd: f.lnd.LndServices, + ChanEvents: f.stores.ChanEventsStore, BitcoinClient: f.bitcoinClient, } @@ -401,6 +402,7 @@ func (f *Faraday) StartAsSubserver(lndGrpc *lndclient.GrpcLndServices, cfg := &frdrpcserver.Config{ Lnd: lndGrpc.LndServices, + ChanEvents: f.stores.ChanEventsStore, BitcoinClient: f.bitcoinClient, } diff --git a/frdrpcserver/rpcserver.go b/frdrpcserver/rpcserver.go index ebc8080..f248490 100644 --- a/frdrpcserver/rpcserver.go +++ b/frdrpcserver/rpcserver.go @@ -15,6 +15,7 @@ import ( "github.com/lightninglabs/faraday/accounting" "github.com/lightninglabs/faraday/chain" + "github.com/lightninglabs/faraday/chanevents" "github.com/lightninglabs/faraday/fiat" "github.com/lightninglabs/faraday/frdrpc" "github.com/lightninglabs/faraday/recommend" @@ -57,6 +58,9 @@ type Config struct { // Lnd is a client which can be used to query lnd. Lnd lndclient.LndServices + // ChanEvents is a database of channel events. + ChanEvents *chanevents.Store + // BitcoinClient is an optional client which can be used to query // on-chain data from a connected bitcoin node. If nil, faraday will // not be able to serve endpoints which require on-chain data.