mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
chainreg: Add BestBlockTracker to ChainControl
This commit takes the best block tracker and adds it to the ChainControl objects and appropriately initializes it on ChainControl creation
This commit is contained in:
parent
405d4e5f73
commit
7c403b439c
@ -145,6 +145,10 @@ type PartialChainControl struct {
|
||||
// interested in.
|
||||
ChainNotifier chainntnfs.ChainNotifier
|
||||
|
||||
// BestBlockTracker is used to maintain a view of the global
|
||||
// chain state that changes over time
|
||||
BestBlockTracker *chainntnfs.BestBlockTracker
|
||||
|
||||
// MempoolNotifier is used to watch for spending events happened in
|
||||
// mempool.
|
||||
MempoolNotifier chainntnfs.MempoolWatcher
|
||||
@ -667,6 +671,9 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) {
|
||||
cfg.Bitcoin.Node)
|
||||
}
|
||||
|
||||
cc.BestBlockTracker =
|
||||
chainntnfs.NewBestBlockTracker(cc.ChainNotifier)
|
||||
|
||||
switch {
|
||||
// If the fee URL isn't set, and the user is running mainnet, then
|
||||
// we'll return an error to instruct them to set a proper fee
|
||||
|
Loading…
Reference in New Issue
Block a user