add RuntimeSubsystems API method; use it in lotus-miner info
This commit is contained in:
committed by
Jennifer Wang
parent
5073c7e6cf
commit
9b7a7713a7
@@ -1007,3 +1007,20 @@ func mutateCfg(r repo.LockedRepo, mutator func(*config.StorageMiner)) error {
|
||||
|
||||
return multierr.Combine(typeErr, setConfigErr)
|
||||
}
|
||||
|
||||
func AddMinerSubsystems(cfg config.MinerSubsystemConfig) (res api.MinerSubsystems) {
|
||||
if cfg.EnableMining {
|
||||
res = append(res, api.MiningSubsystem)
|
||||
}
|
||||
if cfg.EnableSealing {
|
||||
res = append(res, api.SealingSubsystem)
|
||||
}
|
||||
if cfg.EnableSectorStorage {
|
||||
res = append(res, api.SectorStorageSubsystem)
|
||||
}
|
||||
if cfg.EnableMarkets {
|
||||
res = append(res, api.MarketsSubsystem)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user