import (
"bytes"
- g "github.com/anacrolix/generics"
"github.com/anacrolix/multiless"
"github.com/anacrolix/torrent/metainfo"
storageLeft = &cap
}
var allTorrentsUnverifiedBytes int64
- var lastItem g.Option[pieceRequestOrderItem]
pro.tree.Scan(func(_i pieceRequestOrderItem) bool {
- // Check that scan emits pieces in priority order.
- if lastItem.Ok {
- if _i.Less(&lastItem.Value) {
- panic("scan not in order")
- }
- }
- lastItem.Set(_i)
-
ih := _i.key.InfoHash
var t Torrent = input.Torrent(ih)
var piece Piece = t.Piece(_i.key.Index)