mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-18 19:41:21 +02:00
routing: add block cache to BtcdFilteredChainView
This commit makes the block cache available to BtcdFilteredChainView and wraps its GetBlock method so that the block cache is used.
This commit is contained in:
@@ -555,7 +555,9 @@ func NewChainControl(cfg *Config) (*ChainControl, func(), error) {
|
||||
|
||||
// Finally, we'll create an instance of the default chain view to be
|
||||
// used within the routing layer.
|
||||
cc.ChainView, err = chainview.NewBtcdFilteredChainView(*rpcConfig)
|
||||
cc.ChainView, err = chainview.NewBtcdFilteredChainView(
|
||||
*rpcConfig, blockCache,
|
||||
)
|
||||
if err != nil {
|
||||
log.Errorf("unable to create chain view: %v", err)
|
||||
return nil, nil, err
|
||||
|
Reference in New Issue
Block a user