]> Sergey Matveev's repositories - btrtrc.git/blob - request-strategy/piece.go
Don't starve unverified bytes limit on unrequestable pieces
[btrtrc.git] / request-strategy / piece.go
1 package requestStrategy
2
3 type Piece interface {
4         // Whether requests should be made for this piece. This would be false for cases like the piece
5         // is currently being hashed, or already complete.
6         Request() bool
7         // Whether the piece should be counted towards the unverified bytes limit. The intention is to
8         // prevent pieces being starved from the opportunity to move to the completed state.
9         CountUnverified() bool
10 }