make addpiece configurable
This commit is contained in:
parent
1898b82dc4
commit
39bcfab37c
@ -440,6 +440,7 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api lapi.FullNode,
|
|||||||
SealProofType: spt,
|
SealProofType: spt,
|
||||||
}, sectorstorage.SealerConfig{
|
}, sectorstorage.SealerConfig{
|
||||||
ParallelFetchLimit: 10,
|
ParallelFetchLimit: 10,
|
||||||
|
AllowAddPiece: true,
|
||||||
AllowPreCommit1: true,
|
AllowPreCommit1: true,
|
||||||
AllowPreCommit2: true,
|
AllowPreCommit2: true,
|
||||||
AllowCommit: true,
|
AllowCommit: true,
|
||||||
|
6
extern/sector-storage/manager.go
vendored
6
extern/sector-storage/manager.go
vendored
@ -79,6 +79,7 @@ type SealerConfig struct {
|
|||||||
ParallelFetchLimit int
|
ParallelFetchLimit int
|
||||||
|
|
||||||
// Local worker config
|
// Local worker config
|
||||||
|
AllowAddPiece bool
|
||||||
AllowPreCommit1 bool
|
AllowPreCommit1 bool
|
||||||
AllowPreCommit2 bool
|
AllowPreCommit2 bool
|
||||||
AllowCommit bool
|
AllowCommit bool
|
||||||
@ -117,7 +118,10 @@ func New(ctx context.Context, ls stores.LocalStorage, si stores.SectorIndex, cfg
|
|||||||
go m.sched.runSched()
|
go m.sched.runSched()
|
||||||
|
|
||||||
localTasks := []sealtasks.TaskType{
|
localTasks := []sealtasks.TaskType{
|
||||||
sealtasks.TTAddPiece, sealtasks.TTCommit1, sealtasks.TTFinalize, sealtasks.TTFetch, sealtasks.TTReadUnsealed,
|
sealtasks.TTCommit1, sealtasks.TTFinalize, sealtasks.TTFetch, sealtasks.TTReadUnsealed,
|
||||||
|
}
|
||||||
|
if sc.AllowAddPiece {
|
||||||
|
localTasks = append(localTasks, sealtasks.TTAddPiece)
|
||||||
}
|
}
|
||||||
if sc.AllowPreCommit1 {
|
if sc.AllowPreCommit1 {
|
||||||
localTasks = append(localTasks, sealtasks.TTPreCommit1)
|
localTasks = append(localTasks, sealtasks.TTPreCommit1)
|
||||||
|
@ -133,6 +133,7 @@ func DefaultStorageMiner() *StorageMiner {
|
|||||||
Common: defCommon(),
|
Common: defCommon(),
|
||||||
|
|
||||||
Storage: sectorstorage.SealerConfig{
|
Storage: sectorstorage.SealerConfig{
|
||||||
|
AllowAddPiece: true,
|
||||||
AllowPreCommit1: true,
|
AllowPreCommit1: true,
|
||||||
AllowPreCommit2: true,
|
AllowPreCommit2: true,
|
||||||
AllowCommit: true,
|
AllowCommit: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user