netbs: Fix lint
This commit is contained in:
parent
1513aab4c8
commit
fcad93dc10
@ -694,7 +694,7 @@
|
|||||||
# to use when evaluating tasks against this worker. An empty value defaults
|
# to use when evaluating tasks against this worker. An empty value defaults
|
||||||
# to "hardware".
|
# to "hardware".
|
||||||
#
|
#
|
||||||
# type: sealer.ResourceFilteringStrategy
|
# type: ResourceFilteringStrategy
|
||||||
# env var: LOTUS_STORAGE_RESOURCEFILTERING
|
# env var: LOTUS_STORAGE_RESOURCEFILTERING
|
||||||
#ResourceFiltering = "hardware"
|
#ResourceFiltering = "hardware"
|
||||||
|
|
||||||
|
@ -632,7 +632,7 @@ func (n *Ensemble) Start() *Ensemble {
|
|||||||
|
|
||||||
// disable resource filtering so that local worker gets assigned tasks
|
// disable resource filtering so that local worker gets assigned tasks
|
||||||
// regardless of system pressure.
|
// regardless of system pressure.
|
||||||
node.Override(new(config.SealingConfig), func() config.SealingConfig {
|
node.Override(new(config.SealerConfig), func() config.SealerConfig {
|
||||||
scfg := config.DefaultStorageMiner()
|
scfg := config.DefaultStorageMiner()
|
||||||
|
|
||||||
if noLocal {
|
if noLocal {
|
||||||
@ -646,7 +646,7 @@ func (n *Ensemble) Start() *Ensemble {
|
|||||||
scfg.Storage.Assigner = assigner
|
scfg.Storage.Assigner = assigner
|
||||||
scfg.Storage.DisallowRemoteFinalize = disallowRemoteFinalize
|
scfg.Storage.DisallowRemoteFinalize = disallowRemoteFinalize
|
||||||
scfg.Storage.ResourceFiltering = config.ResourceFilteringDisabled
|
scfg.Storage.ResourceFiltering = config.ResourceFilteringDisabled
|
||||||
return scfg.Sealing
|
return scfg.Storage
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// upgrades
|
// upgrades
|
||||||
|
@ -34,10 +34,10 @@ func TestWindowPostNoBuiltinWindow(t *testing.T) {
|
|||||||
kit.PresealSectors(sectors), // 2 sectors per partition, 2 partitions in all 48 deadlines
|
kit.PresealSectors(sectors), // 2 sectors per partition, 2 partitions in all 48 deadlines
|
||||||
kit.LatestActorsAt(-1),
|
kit.LatestActorsAt(-1),
|
||||||
kit.ConstructorOpts(
|
kit.ConstructorOpts(
|
||||||
node.Override(new(*config.ProvingConfig), func() *config.ProvingConfig {
|
node.Override(new(config.ProvingConfig), func() config.ProvingConfig {
|
||||||
c := config.DefaultStorageMiner()
|
c := config.DefaultStorageMiner()
|
||||||
c.Proving.DisableBuiltinWindowPoSt = true
|
c.Proving.DisableBuiltinWindowPoSt = true
|
||||||
return &c.Proving
|
return c.Proving
|
||||||
}),
|
}),
|
||||||
node.Override(new(*wdpost.WindowPoStScheduler), modules.WindowPostScheduler(
|
node.Override(new(*wdpost.WindowPoStScheduler), modules.WindowPostScheduler(
|
||||||
config.DefaultStorageMiner().Fees,
|
config.DefaultStorageMiner().Fees,
|
||||||
@ -91,10 +91,10 @@ func TestWindowPostNoBuiltinWindowWithWorker(t *testing.T) {
|
|||||||
kit.PresealSectors(sectors), // 2 sectors per partition, 2 partitions in all 48 deadlines
|
kit.PresealSectors(sectors), // 2 sectors per partition, 2 partitions in all 48 deadlines
|
||||||
kit.LatestActorsAt(-1),
|
kit.LatestActorsAt(-1),
|
||||||
kit.ConstructorOpts(
|
kit.ConstructorOpts(
|
||||||
node.Override(new(*config.ProvingConfig), func() *config.ProvingConfig {
|
node.Override(new(config.ProvingConfig), func() config.ProvingConfig {
|
||||||
c := config.DefaultStorageMiner()
|
c := config.DefaultStorageMiner()
|
||||||
c.Proving.DisableBuiltinWindowPoSt = true
|
c.Proving.DisableBuiltinWindowPoSt = true
|
||||||
return &c.Proving
|
return c.Proving
|
||||||
}),
|
}),
|
||||||
node.Override(new(*wdpost.WindowPoStScheduler), modules.WindowPostScheduler(
|
node.Override(new(*wdpost.WindowPoStScheduler), modules.WindowPostScheduler(
|
||||||
config.DefaultStorageMiner().Fees,
|
config.DefaultStorageMiner().Fees,
|
||||||
|
@ -408,10 +408,10 @@ func TestWindowPostWorkerManualPoSt(t *testing.T) {
|
|||||||
|
|
||||||
func TestSchedulerRemoveRequest(t *testing.T) {
|
func TestSchedulerRemoveRequest(t *testing.T) {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
_, miner, worker, ens := kit.EnsembleWorker(t, kit.WithAllSubsystems(), kit.ThroughRPC(), kit.WithNoLocalSealing(true),
|
_, miner, worker, _ := kit.EnsembleWorker(t, kit.WithAllSubsystems(), kit.ThroughRPC(), kit.WithNoLocalSealing(true),
|
||||||
kit.WithTaskTypes([]sealtasks.TaskType{sealtasks.TTFetch, sealtasks.TTCommit1, sealtasks.TTFinalize, sealtasks.TTDataCid, sealtasks.TTAddPiece, sealtasks.TTPreCommit1, sealtasks.TTCommit2, sealtasks.TTUnseal})) // no mock proofs
|
kit.WithTaskTypes([]sealtasks.TaskType{sealtasks.TTFetch, sealtasks.TTCommit1, sealtasks.TTFinalize, sealtasks.TTDataCid, sealtasks.TTAddPiece, sealtasks.TTPreCommit1, sealtasks.TTCommit2, sealtasks.TTUnseal})) // no mock proofs
|
||||||
|
|
||||||
ens.InterconnectAll().BeginMining(50 * time.Millisecond)
|
//ens.InterconnectAll().BeginMining(50 * time.Millisecond)
|
||||||
|
|
||||||
e, err := worker.Enabled(ctx)
|
e, err := worker.Enabled(ctx)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
@ -21,6 +21,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
"github.com/filecoin-project/go-statestore"
|
"github.com/filecoin-project/go-statestore"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/lotus/node/config"
|
||||||
"github.com/filecoin-project/lotus/storage/paths"
|
"github.com/filecoin-project/lotus/storage/paths"
|
||||||
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
|
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
|
||||||
"github.com/filecoin-project/lotus/storage/sealer/storiface"
|
"github.com/filecoin-project/lotus/storage/sealer/storiface"
|
||||||
@ -30,7 +31,7 @@ import (
|
|||||||
// only uses miner and does NOT use any remote worker.
|
// only uses miner and does NOT use any remote worker.
|
||||||
func TestPieceProviderSimpleNoRemoteWorker(t *testing.T) {
|
func TestPieceProviderSimpleNoRemoteWorker(t *testing.T) {
|
||||||
// Set up sector storage manager
|
// Set up sector storage manager
|
||||||
sealerCfg := Config{
|
sealerCfg := config.SealerConfig{
|
||||||
ParallelFetchLimit: 10,
|
ParallelFetchLimit: 10,
|
||||||
AllowAddPiece: true,
|
AllowAddPiece: true,
|
||||||
AllowPreCommit1: true,
|
AllowPreCommit1: true,
|
||||||
@ -89,7 +90,7 @@ func TestReadPieceRemoteWorkers(t *testing.T) {
|
|||||||
logging.SetAllLoggers(logging.LevelDebug)
|
logging.SetAllLoggers(logging.LevelDebug)
|
||||||
|
|
||||||
// miner's worker can only add pieces to an unsealed sector.
|
// miner's worker can only add pieces to an unsealed sector.
|
||||||
sealerCfg := Config{
|
sealerCfg := config.SealerConfig{
|
||||||
ParallelFetchLimit: 10,
|
ParallelFetchLimit: 10,
|
||||||
AllowAddPiece: true,
|
AllowAddPiece: true,
|
||||||
AllowPreCommit1: false,
|
AllowPreCommit1: false,
|
||||||
@ -198,7 +199,7 @@ func generatePieceData(size uint64) []byte {
|
|||||||
return bz
|
return bz
|
||||||
}
|
}
|
||||||
|
|
||||||
func newPieceProviderTestHarness(t *testing.T, mgrConfig Config, sectorProofType abi.RegisteredSealProof) *pieceProviderTestHarness {
|
func newPieceProviderTestHarness(t *testing.T, mgrConfig config.SealerConfig, sectorProofType abi.RegisteredSealProof) *pieceProviderTestHarness {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
// listen on tcp socket to create an http server later
|
// listen on tcp socket to create an http server later
|
||||||
address := "0.0.0.0:0"
|
address := "0.0.0.0:0"
|
||||||
@ -217,7 +218,7 @@ func newPieceProviderTestHarness(t *testing.T, mgrConfig Config, sectorProofType
|
|||||||
wsts := statestore.New(namespace.Wrap(dstore, datastore.NewKey("/worker/calls")))
|
wsts := statestore.New(namespace.Wrap(dstore, datastore.NewKey("/worker/calls")))
|
||||||
smsts := statestore.New(namespace.Wrap(dstore, datastore.NewKey("/stmgr/calls")))
|
smsts := statestore.New(namespace.Wrap(dstore, datastore.NewKey("/stmgr/calls")))
|
||||||
|
|
||||||
mgr, err := New(ctx, localStore, remoteStore, storage, index, mgrConfig, wsts, smsts)
|
mgr, err := New(ctx, localStore, remoteStore, storage, index, mgrConfig, config.ProvingConfig{}, wsts, smsts)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
// start a http server on the manager to serve sector file requests.
|
// start a http server on the manager to serve sector file requests.
|
||||||
|
Loading…
Reference in New Issue
Block a user