-
Notifications
You must be signed in to change notification settings - Fork 25
/
deps.go
39 lines (34 loc) · 850 Bytes
/
deps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package lnnode
import (
"github.com/lightninglabs/neutrino"
"github.com/lightningnetwork/lnd/channeldb"
)
/*
Dependencies is an implementation of interface daemon.Dependencies
used for injecting breez deps int LND running as library
*/
type Dependencies struct {
workingDir string
chainService *neutrino.ChainService
readyChan chan interface{}
chanDB *channeldb.DB
}
/*
ReadyChan returns the channel passed to LND for getting ready signal
*/
func (d *Dependencies) ReadyChan() chan interface{} {
return d.readyChan
}
/*
ChainService returns a neutrino.ChainService to be used from both sync job and
LND running daemon
*/
func (d *Dependencies) ChainService() *neutrino.ChainService {
return d.chainService
}
/*
ChanDB returns the channel db for the daemon
*/
func (d *Dependencies) ChanDB() *channeldb.DB {
return d.chanDB
}