mirror of
https://github.com/lightninglabs/faraday.git
synced 2026-08-13 12:33:35 +02:00
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.
This commit is contained in:
parent
9e10faa805
commit
44bb23186a
2 changed files with 6 additions and 0 deletions
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue