Fix DI of PubSub
in markets by binding dependencies it needs
Bind drand and bootstrap peers config so that `PubSub` instantiated by `ConfigCommon` has all the dependencies it needs when `PubSub` instance is needed in markets. In ths case, the instance is needed by the index provider engine to announce new indexing advertisements.
This commit is contained in:
parent
7e7e88e330
commit
f369d99138
@ -75,6 +75,11 @@ func ConfigStorageMiner(c interface{}) Option {
|
||||
enableLibp2pNode := cfg.Subsystems.EnableMarkets // we enable libp2p nodes if the storage market subsystem is enabled, otherwise we don't
|
||||
|
||||
return Options(
|
||||
|
||||
// Needed to instantiate pubsub used by index provider via ConfigCommon
|
||||
Override(new(dtypes.DrandSchedule), modules.BuiltinDrandConfig),
|
||||
Override(new(dtypes.BootstrapPeers), modules.BuiltinBootstrap),
|
||||
Override(new(dtypes.DrandBootstrap), modules.DrandBootstrap),
|
||||
ConfigCommon(&cfg.Common, enableLibp2pNode),
|
||||
|
||||
Override(CheckFDLimit, modules.CheckFdLimit(build.MinerFDLimit)), // recommend at least 100k FD limit to miners
|
||||
|
Loading…
Reference in New Issue
Block a user