piece.go 421 B

12345678910
  1. package requestStrategy
  2. type Piece interface {
  3. // Whether requests should be made for this piece. This would be false for cases like the piece
  4. // is currently being hashed, or already complete.
  5. Request() bool
  6. // Whether the piece should be counted towards the unverified bytes limit. The intention is to
  7. // prevent pieces being starved from the opportunity to move to the completed state.
  8. CountUnverified() bool
  9. }