X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=piecestate.go;h=089adca44051d1602a2be57eb4d949cc6ea6880b;hb=1c1f47555b4d90957482df0e1e5ff67b5c8d5bf7;hp=358ffcf2d015a57b3dfc5cfe364a08a6b63e7560;hpb=6357294297a45521180b3a36b379f27c45d230cc;p=btrtrc.git diff --git a/piecestate.go b/piecestate.go index 358ffcf2..089adca4 100644 --- a/piecestate.go +++ b/piecestate.go @@ -1,12 +1,21 @@ package torrent +import ( + "github.com/anacrolix/torrent/storage" +) + // 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. + storage.Completion + // The piece is being hashed, or is queued for hash. Deprecated: Use those fields instead. Checking bool + + Hashing bool + QueuedForHash bool + // The piece state is being marked in the storage. + Marking bool + // Some of the piece has been obtained. Partial bool }