code: func (cn *connection) setNumPieces(num pieceIndex) error {
  	cn.peerPieces.RemoveRange(bitmap.BitIndex(num), bitmap.ToEnd)
  	cn.peerPiecesChanged()
  	return nil
  }
docs: // Correct the PeerPieces slice length. Return false if the existing slice is
  // invalid, such as by receiving badly sized BITFIELD, or invalid HAVE
  // messages.