piece.go | 1 - torrent.go | 3 +-- diff --git a/piece.go b/piece.go index 1f094813007175849a77413e7f4414e97647aa65..5db87d6a66694472a6ed6d343a74f6adcada6541 100644 --- a/piece.go +++ b/piece.go @@ -49,7 +49,6 @@ // length can be determined by the request chunkSize in use. dirtyChunks bitmap.Bitmap hashing bool - everHashed bool numVerifies int64 storageCompletionOk bool diff --git a/torrent.go b/torrent.go index 2846d275485aa572da4157f9fada185848479002..46c37a8869ed8213f7ed9087e2d15d1ba5143664 100644 --- a/torrent.go +++ b/torrent.go @@ -1502,7 +1502,7 @@ return } 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 @@ log.Printf("%s: piece %d (%s) failed hash: %d connections contributed", t, piece, p.hash, len(touchers)) pieceHashedNotCorrect.Add(1) } } - p.everHashed = true if correct { if len(touchers) != 0 { t.stats.PiecesDirtiedGood++