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:
Oliver Gugger committed 2021-10-08 12:06:53 +02:00
1 parent e79d59dd4c
commit d12154154a
2 files changed
+13 -15

No files matched your search

+3 -3
View File
@@ -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()