]> Sergey Matveev's repositories - btrtrc.git/blobdiff - torrent.go
Change Peer._peerPieces to use raw roaring Bitmap type
[btrtrc.git] / torrent.go
index 3981651a614f247cf36756043d481f85482979bf..d184afd3f1f5fe831c3b1bf0b6e4c0632b08bf3b 100644 (file)
@@ -1408,8 +1408,8 @@ func (t *Torrent) decPeerPieceAvailability(p *Peer) {
        if !t.haveInfo() {
                return
        }
-       p.newPeerPieces().IterTyped(func(i int) bool {
-               p.t.decPieceAvailability(i)
+       p.newPeerPieces().Iterate(func(i uint32) bool {
+               p.t.decPieceAvailability(pieceIndex(i))
                return true
        })
 }