}
// This is distinct from Torrent piece priority, which is the user's
-// preference. Connection piece priority is specific to a connection,
-// pseudorandomly avoids connections always requesting the same pieces and
-// thus wasting effort.
+// preference. Connection piece priority is specific to a connection and is
+// used to pseudorandomly avoid connections always requesting the same pieces
+// and thus wasting effort.
func (cn *connection) updatePiecePriority(piece int) bool {
tpp := cn.t.piecePriority(piece)
if !cn.PeerHasPiece(piece) {
"github.com/anacrolix/torrent/storage"
)
-// Piece priority describes the importance of obtaining a particular piece.
-
+// Describes the importance of obtaining a particular piece.
type piecePriority byte
func (pp *piecePriority) Raise(maybe piecePriority) {
}
}
+// Called when a piece is found to be not complete.
func (t *Torrent) onIncompletePiece(piece int) {
if t.pieceAllDirty(piece) {
t.pendAllChunkSpecs(piece)