routing: add block cache to CfFilteredChainView
This commit adds the block cache to the CfFilteredChainView struct and wraps its GetBlock function so that block cache mutex map is used when the call to neutrino's GetBlock function is called.
This commit is contained in:
1 parent
432b1f0588
commit
6ad5781bf1
3 files changed
+32
-4
No files matched your search
@@ -319,7 +319,9 @@ func NewChainControl(cfg *Config, blockCache *blockcache.BlockCache) (
|
||||
cc.ChainNotifier = neutrinonotify.New(
|
||||
cfg.NeutrinoCS, hintCache, hintCache,
|
||||
)
|
||||
cc.ChainView, err = chainview.NewCfFilteredChainView(cfg.NeutrinoCS)
|
||||
cc.ChainView, err = chainview.NewCfFilteredChainView(
|
||||
cfg.NeutrinoCS, blockCache,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user