There's also Torrent.updatePiecePriority, and it's always confusing what the difference is.
cn.pieceRequestOrder.Remove(piece)
}
+// 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.
func (cn *connection) updatePiecePriority(piece int) {
tpp := cn.t.piecePriority(piece)
if !cn.PeerHasPiece(piece) {