Merge remote-tracking branch 'origin/master' into feat/post-worker
This commit is contained in:
@@ -5,6 +5,11 @@ import (
|
||||
"github.com/filecoin-project/go-state-types/big"
|
||||
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
|
||||
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
|
||||
"github.com/filecoin-project/lotus/extern/storage-sealing/sealiface"
|
||||
"github.com/filecoin-project/lotus/node/config"
|
||||
"github.com/filecoin-project/lotus/node/modules"
|
||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||
"github.com/filecoin-project/lotus/node/repo"
|
||||
|
||||
"github.com/filecoin-project/lotus/build"
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
@@ -160,6 +165,17 @@ func ConstructorOpts(extra ...node.Option) NodeOpt {
|
||||
}
|
||||
}
|
||||
|
||||
func MutateSealingConfig(mut func(sc *config.SealingConfig)) NodeOpt {
|
||||
return ConstructorOpts(
|
||||
node.ApplyIf(node.IsType(repo.StorageMiner), node.Override(new(dtypes.GetSealingConfigFunc), func() (dtypes.GetSealingConfigFunc, error) {
|
||||
return func() (sealiface.Config, error) {
|
||||
cf := config.DefaultStorageMiner()
|
||||
mut(&cf.Sealing)
|
||||
return modules.ToSealingConfig(cf.Dealmaking, cf.Sealing), nil
|
||||
}, nil
|
||||
})))
|
||||
}
|
||||
|
||||
// SectorSize sets the sector size for this miner. Start() will populate the
|
||||
// corresponding proof type depending on the network version (genesis network
|
||||
// version if the Ensemble is unstarted, or the current network version
|
||||
|
||||
Reference in New Issue
Block a user