chainreg+lnd: add block cache to chainreg config
The block cache size in the chainreg.Config previously wasn't used but instead the block cache was passed in as a separate parameter. We replace the cache size with the actual cache in the config to streamline things somewhat.
This commit is contained in:
2 files changed
+13
-15
No files matched your search
@@ -729,8 +729,8 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
|
||||
Dialer: func(addr string) (net.Conn, error) {
|
||||
return cfg.net.Dial("tcp", addr, cfg.ConnectionTimeout)
|
||||
},
|
||||
BlockCacheSize: cfg.BlockCacheSize,
|
||||
LoaderOptions: []btcwallet.LoaderOption{dbs.walletDB},
|
||||
BlockCache: blockCache,
|
||||
LoaderOptions: []btcwallet.LoaderOption{dbs.walletDB},
|
||||
}
|
||||
|
||||
// Parse coin selection strategy.
|
||||
@@ -747,7 +747,7 @@ func Main(cfg *Config, lisCfg ListenerCfg, interceptor signal.Interceptor) error
|
||||
}
|
||||
|
||||
activeChainControl, cleanup, err := chainreg.NewChainControl(
|
||||
chainControlCfg, blockCache,
|
||||
chainControlCfg,
|
||||
)
|
||||
if cleanup != nil {
|
||||
defer cleanup()
|
||||
|
||||
Reference in new issue
Block a user