update init sector state list
This commit is contained in:
parent
ed74091c20
commit
d5af25b76c
@ -17,9 +17,9 @@ import (
|
||||
|
||||
"github.com/filecoin-project/lotus/api"
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
|
||||
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
|
||||
|
||||
lcli "github.com/filecoin-project/lotus/cli"
|
||||
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
|
||||
)
|
||||
|
||||
var sectorsCmd = &cli.Command{
|
||||
|
63
extern/storage-sealing/sector_state.go
vendored
63
extern/storage-sealing/sector_state.go
vendored
@ -2,7 +2,37 @@ package sealing
|
||||
|
||||
type SectorState string
|
||||
|
||||
var ExistSectorStateList = make(map[SectorState]struct{})
|
||||
var ExistSectorStateList = map[SectorState]struct{}{
|
||||
Empty: {},
|
||||
WaitDeals: {},
|
||||
Packing: {},
|
||||
PreCommit1: {},
|
||||
PreCommit2: {},
|
||||
PreCommitting: {},
|
||||
PreCommitWait: {},
|
||||
WaitSeed: {},
|
||||
Committing: {},
|
||||
SubmitCommit: {},
|
||||
CommitWait: {},
|
||||
FinalizeSector: {},
|
||||
Proving: {},
|
||||
FailedUnrecoverable: {},
|
||||
SealPreCommit1Failed: {},
|
||||
SealPreCommit2Failed: {},
|
||||
PreCommitFailed: {},
|
||||
ComputeProofFailed: {},
|
||||
CommitFailed: {},
|
||||
PackingFailed: {},
|
||||
FinalizeFailed: {},
|
||||
DealsExpired: {},
|
||||
RecoverDealIDs: {},
|
||||
Faulty: {},
|
||||
FaultReported: {},
|
||||
FaultedFinal: {},
|
||||
Removing: {},
|
||||
RemoveFailed: {},
|
||||
Removed: {},
|
||||
}
|
||||
|
||||
const (
|
||||
UndefinedSectorState SectorState = ""
|
||||
@ -41,37 +71,6 @@ const (
|
||||
RemoveFailed SectorState = "RemoveFailed"
|
||||
Removed SectorState = "Removed"
|
||||
)
|
||||
func init() {
|
||||
ExistSectorStateList[Empty] = struct{}{}
|
||||
ExistSectorStateList[WaitDeals] = struct{}{}
|
||||
ExistSectorStateList[Packing] = struct{}{}
|
||||
ExistSectorStateList[PreCommit1] = struct{}{}
|
||||
ExistSectorStateList[PreCommit2] = struct{}{}
|
||||
ExistSectorStateList[PreCommitting] = struct{}{}
|
||||
ExistSectorStateList[PreCommitWait] = struct{}{}
|
||||
ExistSectorStateList[WaitSeed] = struct{}{}
|
||||
ExistSectorStateList[Committing] = struct{}{}
|
||||
ExistSectorStateList[SubmitCommit] = struct{}{}
|
||||
ExistSectorStateList[CommitWait] = struct{}{}
|
||||
ExistSectorStateList[FinalizeSector] = struct{}{}
|
||||
ExistSectorStateList[Proving] = struct{}{}
|
||||
ExistSectorStateList[FailedUnrecoverable] = struct{}{}
|
||||
ExistSectorStateList[SealPreCommit1Failed] = struct{}{}
|
||||
ExistSectorStateList[SealPreCommit2Failed] = struct{}{}
|
||||
ExistSectorStateList[PreCommitFailed] = struct{}{}
|
||||
ExistSectorStateList[ComputeProofFailed] = struct{}{}
|
||||
ExistSectorStateList[CommitFailed] = struct{}{}
|
||||
ExistSectorStateList[PackingFailed] = struct{}{}
|
||||
ExistSectorStateList[FinalizeFailed] = struct{}{}
|
||||
ExistSectorStateList[DealsExpired] = struct{}{}
|
||||
ExistSectorStateList[RecoverDealIDs] = struct{}{}
|
||||
ExistSectorStateList[Faulty] = struct{}{}
|
||||
ExistSectorStateList[FaultReported] = struct{}{}
|
||||
ExistSectorStateList[FaultedFinal] = struct{}{}
|
||||
ExistSectorStateList[Removing] = struct{}{}
|
||||
ExistSectorStateList[RemoveFailed] = struct{}{}
|
||||
ExistSectorStateList[Removed] = struct{}{}
|
||||
}
|
||||
|
||||
func toStatState(st SectorState) statSectorState {
|
||||
switch st {
|
||||
|
Loading…
Reference in New Issue
Block a user