a41f938cec
As we have seen, dependencies version can prevent the build. We should user lock versions on dependencies that we know work: * Packages are vendored * Add Godep support * Added addtional install step in readme * Fix travis build error
18 lignes
453 o
Go
18 lignes
453 o
Go
package torrent
|
|
|
|
// The current state of a piece.
|
|
type PieceState struct {
|
|
Priority piecePriority
|
|
// The piece is available in its entirety.
|
|
Complete bool
|
|
// 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.
|
|
}
|