From: Matt Joiner Date: Sat, 9 Oct 2021 03:20:54 +0000 (+1100) Subject: Pieces being marked should have priority none X-Git-Tag: v1.34.0~6 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=329578520a2e94ff5fdbac24aca5f157caf265d2;p=btrtrc.git Pieces being marked should have priority none Also reorder the checks a bit to favour the cheaper ones. --- diff --git a/piece.go b/piece.go index 6376c8c1..20c5c19a 100644 --- a/piece.go +++ b/piece.go @@ -212,7 +212,7 @@ func (p *Piece) purePriority() (ret piecePriority) { } func (p *Piece) uncachedPriority() (ret piecePriority) { - if p.t.pieceComplete(p.index) || p.t.pieceQueuedForHash(p.index) || p.t.hashingPiece(p.index) { + if p.hashing || p.marking || p.t.pieceComplete(p.index) || p.queuedForHash() { return PiecePriorityNone } return p.purePriority()