routing: add block cache to BitcoindFilteredChainView

This commit adds the block cache to the BitcoindFilteredChainView struct
and wraps its GetBlock function so that block cache is used.
This commit is contained in:
Elle Mouton
2021-03-18 14:24:06 +02:00
parent 106f93a1b4
commit 0193669ed8
3 changed files with 25 additions and 4 deletions

View File

@@ -418,7 +418,9 @@ func NewChainControl(cfg *Config) (*ChainControl, func(), error) {
cc.ChainNotifier = bitcoindnotify.New(
bitcoindConn, cfg.ActiveNetParams.Params, hintCache, hintCache,
)
cc.ChainView = chainview.NewBitcoindFilteredChainView(bitcoindConn)
cc.ChainView = chainview.NewBitcoindFilteredChainView(
bitcoindConn, blockCache,
)
walletConfig.ChainSource = bitcoindConn.NewBitcoindClient()
// If we're not in regtest mode, then we'll attempt to use a