if spec.DisplayName != "" {
t.SetDisplayName(spec.DisplayName)
}
+ t.initialPieceCheckDisabled = spec.DisableInitialPieceCheck
if spec.InfoBytes != nil {
err := t.SetInfoBytes(spec.InfoBytes)
if err != nil {
Sources []string
// The chunk size to use for outbound requests. Defaults to 16KiB if not set.
- ChunkSize int
- Storage storage.ClientImpl
+ ChunkSize int
+ DisableInitialPieceCheck bool
+ Storage storage.ClientImpl
// Whether to allow data download or upload
DisallowDataUpload bool
// A cache of completed piece indices.
_completedPieces roaring.Bitmap
// Pieces that need to be hashed.
- piecesQueuedForHash bitmap.Bitmap
- activePieceHashes int
+ piecesQueuedForHash bitmap.Bitmap
+ activePieceHashes int
+ initialPieceCheckDisabled bool
// A pool of piece priorities []int for assignment to new connections.
// These "inclinations" are used to give connections preference for
}
p.availability = int64(t.pieceAvailabilityFromPeers(i))
t.updatePieceCompletion(pieceIndex(i))
- if !p.storageCompletionOk {
+ if !t.initialPieceCheckDisabled && !p.storageCompletionOk {
// t.logger.Printf("piece %s completion unknown, queueing check", p)
t.queuePieceCheck(pieceIndex(i))
}