mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 14:44:22 +01:00
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:
@@ -895,7 +895,11 @@ var interfaceImpls = []struct {
|
||||
os.RemoveAll(spvDir)
|
||||
}
|
||||
|
||||
chainView, err := NewCfFilteredChainView(spvNode)
|
||||
blockCache := blockcache.NewBlockCache(10000)
|
||||
|
||||
chainView, err := NewCfFilteredChainView(
|
||||
spvNode, blockCache,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user