]> Sergey Matveev's repositories - btrtrc.git/blobdiff - torrent.go
Check that chunks we request aren't being hashed or queued for hash
[btrtrc.git] / torrent.go
index fe3df93f4ca125c1f5685f541d757d8bf3c1310c..5736dee5ff7ca891180a499b308014835d9fcf23 100644 (file)
@@ -1776,3 +1776,11 @@ func (t *Torrent) allStats(f func(*ConnStats)) {
        f(&t.stats)
        f(&t.cl.stats)
 }
+
+func (t *Torrent) hashingPiece(i pieceIndex) bool {
+       return t.pieces[i].hashing
+}
+
+func (t *Torrent) pieceQueuedForHash(i pieceIndex) bool {
+       return t.piecesQueuedForHash.Get(bitmap.BitIndex(i))
+}