No distinction. The entire industry
is built on shaky legal ground. The only defense available to growers, distributors, and their investors is estoppel.
Estoppel is a category of legal principles that basically allow a court to refuse to hear a claim or defense if the claimant or respondent (in this case, the government), through affirmative action or gross inaction, did something such that the law would deem it especially unfair (often the test is "unconscionable") to permit the claimant or respondent the benefit of a claim or defense.
The classic example is promissory estoppel.
The biggest problem is that most forms of estoppel are generally not permitted in criminal matters, or much more difficult to convince a court to accept.
In this case, the basis for estoppel would be that various regulators and the DoJ have made statements that they would refrain from prosecuting certain offenses related to marijuana commerce if the acts were permitted legally under state law.
However, as far as I know, these statements
1) never pronounced the behavior legal under federal law, but merely provided an outline for how regulators and prosecutors would use their prosecutorial discretion;
2) were generally limited to medical marijuana;
3) were otherwise heavily hedged.
For these and other reasons I don't think any major financial institutions have invested in the marijuana industry. Usually it's local, individual investors providing financing, if any.
As the law is understood today few lawyers would expect to successfully defend a federal prosecution. At the margins, given all the context maybe many judges would be more likely to favor a defendant, such as imposing unusually light sentences or being unusually deferential to other defenses. But nobody should harbor the illusion that any aspect of the state-sanctioned marijuana industry, medical or recreational, is legal under federal law.