From e67b85215ca7b9c8371b32d36467b0321cac33d5 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 3 Feb 2018 12:14:39 +1100 Subject: [PATCH] Piece.everHashed is replaced by storageCompletionOk --- piece.go | 1 - torrent.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/piece.go b/piece.go index 1f094813..5db87d6a 100644 --- a/piece.go +++ b/piece.go @@ -49,7 +49,6 @@ type Piece struct { dirtyChunks bitmap.Bitmap hashing bool - everHashed bool numVerifies int64 storageCompletionOk bool diff --git a/torrent.go b/torrent.go index 2846d275..46c37a88 100644 --- a/torrent.go +++ b/torrent.go @@ -1502,7 +1502,7 @@ func (t *Torrent) pieceHashed(piece int, correct bool) { } p := &t.pieces[piece] touchers := t.reapPieceTouchers(piece) - if p.everHashed { + if p.storageCompletionOk { // Don't score the first time a piece is hashed, it could be an // initial check. if correct { @@ -1512,7 +1512,6 @@ func (t *Torrent) pieceHashed(piece int, correct bool) { pieceHashedNotCorrect.Add(1) } } - p.everHashed = true if correct { if len(touchers) != 0 { t.stats.PiecesDirtiedGood++