The dude had it coming to him, walking up to strangers and trying to sell to them. That's gotta be in the top 5 rules of what not to do when you're a drug dealer. Especially selling to an adult who is so likely to be a cop, that's just naive or desperate.
On a side note, SWIM has transported personal quantities of hard drugs multiple times on Amtrak trains and has been amazed at the total lack of security considering the unreasonable and agonizingly slow high-level security systems in U.S. airports. SWIM was actually freaking out a little bit, getting paranoid with a sort of "it's quiet, too quiet" mentality sitting on a crowded train. But SWIM has been so blissed out on different opiates and no one on the train has ever even looked twice at him.