address nits.

This commit is contained in:
Raúl Kripalani 2021-07-28 23:46:21 +01:00 committed by Jennifer Wang
parent 85a4f8325f
commit f9ea2e834c
2 changed files with 3 additions and 3 deletions

View File

@ -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),

View File

@ -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
} }