chainntnfs: add block cache to BitcoindNotifier

This commit adds a blockcache pointer to BitcoindNotifier and wraps its
GetBlock method so that the block cache is used.
This commit is contained in:
Elle Mouton
2021-03-18 14:42:18 +02:00
parent f470946379
commit 8a33fbf11a
5 changed files with 48 additions and 13 deletions

View File

@@ -416,7 +416,8 @@ func NewChainControl(cfg *Config) (*ChainControl, func(), error) {
}
cc.ChainNotifier = bitcoindnotify.New(
bitcoindConn, cfg.ActiveNetParams.Params, hintCache, hintCache,
bitcoindConn, cfg.ActiveNetParams.Params, hintCache,
hintCache, blockCache,
)
cc.ChainView = chainview.NewBitcoindFilteredChainView(
bitcoindConn, blockCache,