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 committed 2021-04-28 09:46:11 +02:00
1 parent 106f93a1b4
commit 0193669ed8
3 files changed
+25 -4

No files matched your search

+3 -1
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