]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Comments on the VerifyData methods
authorMatt Joiner <anacrolix@gmail.com>
Thu, 25 Jul 2019 04:13:42 +0000 (14:13 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 25 Jul 2019 04:13:42 +0000 (14:13 +1000)
piece.go
torrent.go

index 6598859523150abd9cf78bcb6df5e577ed0484cd..6808413a9892c3b069a7ee683240964a7779d651 100644 (file)
--- a/piece.go
+++ b/piece.go
@@ -178,6 +178,7 @@ func (p *Piece) bytesLeft() (ret pp.Integer) {
        return p.length() - p.numDirtyBytes()
 }
 
+// Forces the piece data to be rehashed.
 func (p *Piece) VerifyData() {
        p.t.cl.lock()
        defer p.t.cl.unlock()
index 26f23869c906615e15f9512dd8eda5de5c95619c..9b1a920b315feea380f466b93691d752bdb6209b 100644 (file)
@@ -1666,6 +1666,7 @@ func (t *Torrent) queuePieceCheck(pieceIndex pieceIndex) {
        go t.verifyPiece(pieceIndex)
 }
 
+// Forces all the pieces to be re-hashed. See also Piece.VerifyData.
 func (t *Torrent) VerifyData() {
        for i := pieceIndex(0); i < t.NumPieces(); i++ {
                t.Piece(i).VerifyData()