]> Sergey Matveev's repositories - btrtrc.git/blobdiff - torrent.go
Reduce the diff to master and add peerRequesting feature const
[btrtrc.git] / torrent.go
index bf7968cf0671f0db2996cb833a2960e076f1afb9..370865e6bee24c974ec1883e79a23cfffbea8936 100644 (file)
@@ -842,14 +842,14 @@ func (t *Torrent) bitfield() (bf []bool) {
        return
 }
 
-func (t *Torrent) chunksPerRegularPiece() uint32 {
-       return uint32((pp.Integer(t.usualPieceSize()) + t.chunkSize - 1) / t.chunkSize)
-}
-
 func (t *Torrent) pieceNumChunks(piece pieceIndex) chunkIndexType {
        return chunkIndexType((t.pieceLength(piece) + t.chunkSize - 1) / t.chunkSize)
 }
 
+func (t *Torrent) chunksPerRegularPiece() uint32 {
+       return uint32((pp.Integer(t.usualPieceSize()) + t.chunkSize - 1) / t.chunkSize)
+}
+
 func (t *Torrent) pendAllChunkSpecs(pieceIndex pieceIndex) {
        t.pieces[pieceIndex]._dirtyChunks.Clear()
 }