3 // The current state of a piece.
4 type PieceState struct {
6 // The piece is available in its entirety.
8 // The piece is being hashed, or is queued for hash.
10 // Some of the piece has been obtained.
14 // Represents a series of consecutive pieces with the same state.
15 type PieceStateRun struct {
17 Length int // How many consecutive pieces have this state.