2
0
mirror of synced 2025-02-23 14:18:13 +00:00
torrent/piecestate.go
2018-05-02 19:23:05 +10:00

22 lines
466 B
Go

package torrent
import (
"github.com/anacrolix/torrent/storage"
)
// The current state of a piece.
type PieceState struct {
Priority piecePriority
storage.Completion
// The piece is being hashed, or is queued for hash.
Checking bool
// Some of the piece has been obtained.
Partial bool
}
// Represents a series of consecutive pieces with the same state.
type PieceStateRun struct {
PieceState
Length int // How many consecutive pieces have this state.
}