diff --git a/chainreg/chainregistry.go b/chainreg/chainregistry.go index 3c54a0aef..93d5c1dd1 100644 --- a/chainreg/chainregistry.go +++ b/chainreg/chainregistry.go @@ -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