state.go 1023 Bytes
Newer Older
1
2
3
4
5
6
package sealing_state

// State communicates the state of the sector with respect to sealing.
type State int

const (
7
8
9
10
11
12
13
14
15
16
	Unknown             State = iota
	AcceptingPieces           // sector is still accepting user data
	Committed                 // sector has been committed to a ticket and seed
	Committing                // sector is being committed
	CommittingPaused          // sector was committing, but now paused
	Failed                    // sector failed during pre-commit or commit
	FullyPacked               // sector is no longer accepting pieces; is fully packed
	PreCommitted              // sector has been pre-committed to a ticket
	PreCommitting             // sector is pre-committing
	PreCommittingPaused       // sector was paused during pre-commit
17
)
18

19
var Labels = [...]string{
20
	"Unknown",
21
22
23
24
	"AcceptingPieces",
	"Committed",
	"Committing",
	"CommittingPaused",
25
	"Failed",
26
27
28
29
	"FullyPacked",
	"PreCommitted",
	"PreCommitting",
	"PreCommittingPaused",
30
31
32
}

func (el State) String() string {
33
	return Labels[el]
34
}