diff --git a/piece.go b/piece.go index 97b6087c..d2211aa0 100644 --- a/piece.go +++ b/piece.go @@ -256,3 +256,7 @@ func (p *Piece) requestStrategyPiece() requestStrategyPiece { func (p *Piece) dirtyChunks() bitmap.Bitmap { return p._dirtyChunks } + +func (p *Piece) State() PieceState { + return p.t.PieceState(p.index) +}