rename cfg.Subsystems.EnableStorageMarket to EnableMarkets
This commit is contained in:
parent
056136ef5a
commit
4bc9fa04ba
@ -95,7 +95,7 @@ var serviceCmd = &cli.Command{
|
||||
}
|
||||
|
||||
if err := restore(ctx, cctx, func(cfg *config.StorageMiner) error {
|
||||
cfg.Subsystems.EnableStorageMarket = cctx.Bool("enable-market")
|
||||
cfg.Subsystems.EnableMarkets = cctx.Bool("enable-market")
|
||||
cfg.Subsystems.EnableMining = false
|
||||
cfg.Subsystems.EnableSealing = false
|
||||
cfg.Subsystems.EnableSectorStorage = false
|
||||
|
@ -132,7 +132,7 @@ var runCmd = &cli.Command{
|
||||
return xerrors.Errorf("invalid config for repo, got: %T", c)
|
||||
}
|
||||
|
||||
bootstrapLibP2P := cfg.Subsystems.EnableStorageMarket
|
||||
bootstrapLibP2P := cfg.Subsystems.EnableMarkets
|
||||
|
||||
err = lr.Close()
|
||||
if err != nil {
|
||||
|
@ -424,7 +424,7 @@ func (n *Ensemble) Start() *Ensemble {
|
||||
n.t.Fatalf("invalid config from repo, got: %T", c)
|
||||
}
|
||||
cfg.Common.API.RemoteListenAddress = m.RemoteListener.Addr().String()
|
||||
cfg.Subsystems.EnableStorageMarket = m.options.subsystems.Has(SStorageMarket)
|
||||
cfg.Subsystems.EnableMarkets = m.options.subsystems.Has(SMarkets)
|
||||
cfg.Subsystems.EnableMining = m.options.subsystems.Has(SMining)
|
||||
cfg.Subsystems.EnableSealing = m.options.subsystems.Has(SSealing)
|
||||
cfg.Subsystems.EnableSectorStorage = m.options.subsystems.Has(SSectorStorage)
|
||||
|
@ -38,7 +38,7 @@ func EnsembleWithMinerAndMarketNodes(t *testing.T, opts ...interface{}) (*TestFu
|
||||
ens := NewEnsemble(t, eopts...).FullNode(&fullnode, nopts...).Miner(&main, &fullnode, mainNodeOpts...).Start()
|
||||
ens.BeginMining(blockTime)
|
||||
|
||||
marketNodeOpts := []NodeOpt{OwnerAddr(fullnode.DefaultKey), MainMiner(&main), WithSubsystems(SStorageMarket)}
|
||||
marketNodeOpts := []NodeOpt{OwnerAddr(fullnode.DefaultKey), MainMiner(&main), WithSubsystems(SMarkets)}
|
||||
marketNodeOpts = append(marketNodeOpts, nopts...)
|
||||
|
||||
ens.Miner(&market, &fullnode, marketNodeOpts...).Start().Connect(market, fullnode)
|
||||
|
@ -31,7 +31,7 @@ import (
|
||||
type MinerSubsystem int
|
||||
|
||||
const (
|
||||
SStorageMarket MinerSubsystem = 1 << iota
|
||||
SMarkets MinerSubsystem = 1 << iota
|
||||
SMining
|
||||
SSealing
|
||||
SSectorStorage
|
||||
|
@ -49,7 +49,7 @@ type NodeOpt func(opts *nodeOpts) error
|
||||
|
||||
func WithAllSubsystems() NodeOpt {
|
||||
return func(opts *nodeOpts) error {
|
||||
opts.subsystems = opts.subsystems.Add(SStorageMarket)
|
||||
opts.subsystems = opts.subsystems.Add(SMarkets)
|
||||
opts.subsystems = opts.subsystems.Add(SMining)
|
||||
opts.subsystems = opts.subsystems.Add(SSealing)
|
||||
opts.subsystems = opts.subsystems.Add(SSectorStorage)
|
||||
|
@ -67,7 +67,7 @@ func ConfigStorageMiner(c interface{}) Option {
|
||||
return Error(xerrors.New("retrieval pricing policy must be either default or external"))
|
||||
}
|
||||
|
||||
enableLibp2pNode := cfg.Subsystems.EnableStorageMarket // we enable libp2p nodes if the storage market subsystem is enabled, otherwise we don't
|
||||
enableLibp2pNode := cfg.Subsystems.EnableMarkets // we enable libp2p nodes if the storage market subsystem is enabled, otherwise we don't
|
||||
|
||||
return Options(
|
||||
ConfigCommon(&cfg.Common, enableLibp2pNode),
|
||||
@ -127,7 +127,7 @@ func ConfigStorageMiner(c interface{}) Option {
|
||||
Override(new(stores.SectorIndex), From(new(modules.MinerSealingService))),
|
||||
),
|
||||
|
||||
If(cfg.Subsystems.EnableStorageMarket,
|
||||
If(cfg.Subsystems.EnableMarkets,
|
||||
// Markets
|
||||
Override(new(dtypes.StagingMultiDstore), modules.StagingMultiDatastore),
|
||||
Override(new(dtypes.StagingBlockstore), modules.StagingBlockstore),
|
||||
@ -209,7 +209,7 @@ func StorageMiner(out *api.StorageMiner, subsystemsCfg config.MinerSubsystemConf
|
||||
|
||||
func(s *Settings) error {
|
||||
s.nodeType = repo.StorageMiner
|
||||
s.enableLibp2pNode = subsystemsCfg.EnableStorageMarket
|
||||
s.enableLibp2pNode = subsystemsCfg.EnableMarkets
|
||||
return nil
|
||||
},
|
||||
|
||||
|
@ -62,7 +62,7 @@ type MinerSubsystemConfig struct {
|
||||
EnableMining bool
|
||||
EnableSealing bool
|
||||
EnableSectorStorage bool
|
||||
EnableStorageMarket bool
|
||||
EnableMarkets bool
|
||||
|
||||
SealerApiInfo string // if EnableSealing == false
|
||||
SectorIndexApiInfo string // if EnableSectorStorage == false
|
||||
@ -400,7 +400,7 @@ func DefaultStorageMiner() *StorageMiner {
|
||||
EnableMining: true,
|
||||
EnableSealing: true,
|
||||
EnableSectorStorage: true,
|
||||
EnableStorageMarket: true,
|
||||
EnableMarkets: true,
|
||||
},
|
||||
|
||||
Fees: MinerFeeConfig{
|
||||
|
Loading…
Reference in New Issue
Block a user