restorePiece

fun restorePiece(piece: Int, blocks: IntArray = IntArray(0))

Restore piece after a hash/write failure so it can be re-downloaded. Mirrors restore_piece. With no blocks given the whole piece is reset (its download entry is dropped). With specific blocks, only those writing/finished blocks are freed; the piece is dropped only once it is empty.