]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix piece hashing expvars update condition
authorMatt Joiner <anacrolix@gmail.com>
Sat, 19 Jul 2025 11:45:34 +0000 (21:45 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 19 Jul 2025 11:45:34 +0000 (21:45 +1000)
torrent.go

index 1a0db793d40a8eec65160f8d928d307b1153d120..bbbbf63459029b3eaf8176696df567dc2c92aac3 100644 (file)
@@ -2498,7 +2498,7 @@ func (t *Torrent) pieceHashed(piece pieceIndex, passed bool, hashIoErr error) {
        }
 
        // Don't score the first time a piece is hashed, it could be an initial check.
-       if p.numVerifies == 1 {
+       if t.initialPieceCheckDisabled || p.numVerifies != 1 {
                if passed {
                        pieceHashedCorrect.Add(1)
                } else {