address nits.
This commit is contained in:
parent
85a4f8325f
commit
f9ea2e834c
@ -72,7 +72,7 @@ func ConfigStorageMiner(c interface{}) Option {
|
|||||||
return Options(
|
return Options(
|
||||||
ConfigCommon(&cfg.Common, enableLibp2pNode),
|
ConfigCommon(&cfg.Common, enableLibp2pNode),
|
||||||
|
|
||||||
Override(new(api.MinerSubsystems), modules.PopulateEnabledMinerSubsystems(cfg.Subsystems)),
|
Override(new(api.MinerSubsystems), modules.ExtractEnabledMinerSubsystems(cfg.Subsystems)),
|
||||||
Override(new(stores.LocalStorage), From(new(repo.LockedRepo))),
|
Override(new(stores.LocalStorage), From(new(repo.LockedRepo))),
|
||||||
Override(new(*stores.Local), modules.LocalStorage),
|
Override(new(*stores.Local), modules.LocalStorage),
|
||||||
Override(new(*stores.Remote), modules.RemoteStorage),
|
Override(new(*stores.Remote), modules.RemoteStorage),
|
||||||
|
@ -1008,7 +1008,7 @@ func mutateCfg(r repo.LockedRepo, mutator func(*config.StorageMiner)) error {
|
|||||||
return multierr.Combine(typeErr, setConfigErr)
|
return multierr.Combine(typeErr, setConfigErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
func PopulateEnabledMinerSubsystems(cfg config.MinerSubsystemConfig) (res api.MinerSubsystems) {
|
func ExtractEnabledMinerSubsystems(cfg config.MinerSubsystemConfig) (res api.MinerSubsystems) {
|
||||||
if cfg.EnableMining {
|
if cfg.EnableMining {
|
||||||
res = append(res, api.SubsystemMining)
|
res = append(res, api.SubsystemMining)
|
||||||
}
|
}
|
||||||
@ -1021,5 +1021,5 @@ func PopulateEnabledMinerSubsystems(cfg config.MinerSubsystemConfig) (res api.Mi
|
|||||||
if cfg.EnableMarkets {
|
if cfg.EnableMarkets {
|
||||||
res = append(res, api.SubsystemMarkets)
|
res = append(res, api.SubsystemMarkets)
|
||||||
}
|
}
|
||||||
return
|
return res
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user