workers: gofmt

This commit is contained in:
Łukasz Magiera 2020-03-25 21:20:24 +01:00
parent 05f52b1fad
commit 42c9d53ae1
3 changed files with 10 additions and 5 deletions

View File

@ -56,7 +56,7 @@ type Storage struct {
// Local worker config
AllowPreCommit1 bool
AllowPreCommit2 bool
AllowCommit bool
AllowCommit bool
}
func defCommon() Common {

View File

@ -119,9 +119,15 @@ func New(ctx context.Context, ls stores.LocalStorage, si stores.SectorIndex, cfg
localTasks := []sealtasks.TaskType{
sealtasks.TTAddPiece, sealtasks.TTCommit1, sealtasks.TTFinalize,
}
if sc.AllowPreCommit1 { localTasks = append(localTasks, sealtasks.TTPreCommit1)}
if sc.AllowPreCommit2 { localTasks = append(localTasks, sealtasks.TTPreCommit2)}
if sc.AllowCommit { localTasks = append(localTasks, sealtasks.TTCommit2)}
if sc.AllowPreCommit1 {
localTasks = append(localTasks, sealtasks.TTPreCommit1)
}
if sc.AllowPreCommit2 {
localTasks = append(localTasks, sealtasks.TTPreCommit2)
}
if sc.AllowCommit {
localTasks = append(localTasks, sealtasks.TTCommit2)
}
err = m.AddWorker(ctx, NewLocalWorker(WorkerConfig{
SealProof: cfg.SealProofType,

View File

@ -337,7 +337,6 @@ func (st *Local) MoveStorage(ctx context.Context, s abi.SectorID, types sectorbu
return xerrors.Errorf("failed to get source storage info: %w", err)
}
if sst.ID == dst.ID {
log.Debugf("not moving %v(%d); src and dest are the same", s, fileType)
continue